Package picard.vcf.processor.util
Class PredicateFilterDecoratingClosableIterator<T>
java.lang.Object
picard.vcf.processor.util.PredicateFilterDecoratingClosableIterator<T>
- All Implemented Interfaces:
htsjdk.samtools.util.CloseableIterator<T>,Closeable,AutoCloseable,Iterator<T>
public class PredicateFilterDecoratingClosableIterator<T>
extends Object
implements htsjdk.samtools.util.CloseableIterator<T>
Performs on-the-fly filtering of the provided
VariantContext Iterator such that only variants that satisfy
all predicates are emitted.
This class only exists because Iterators.filter(Iterator, Predicate) won't produce a CloseableIterator, which is
necessary.-
Constructor Summary
ConstructorsConstructorDescriptionPredicateFilterDecoratingClosableIterator(htsjdk.samtools.util.CloseableIterator<T> underlyingIterator, Collection<com.google.common.base.Predicate<T>> predicates) -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface htsjdk.samtools.util.CloseableIterator
stream, toListMethods inherited from interface java.util.Iterator
forEachRemaining
-
Constructor Details
-
PredicateFilterDecoratingClosableIterator
public PredicateFilterDecoratingClosableIterator(htsjdk.samtools.util.CloseableIterator<T> underlyingIterator, Collection<com.google.common.base.Predicate<T>> predicates)
-
-
Method Details
-
hasNext
public boolean hasNext() -
next
-
close
public void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein interfacehtsjdk.samtools.util.CloseableIterator<T>
-
remove
public void remove()
-