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 providedVariantContext
Iterator
such that only variants that satisfy all predicates are emitted. This class only exists becauseIterators.filter(Iterator, Predicate)
won't produce aCloseableIterator
, which is necessary.
-
-
Constructor Summary
Constructors Constructor Description PredicateFilterDecoratingClosableIterator(htsjdk.samtools.util.CloseableIterator<T> underlyingIterator, Collection<com.google.common.base.Predicate<T>> predicates)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
boolean
hasNext()
T
next()
void
remove()
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.util.Iterator
forEachRemaining
-
-
-
-
Constructor Detail
-
PredicateFilterDecoratingClosableIterator
public PredicateFilterDecoratingClosableIterator(htsjdk.samtools.util.CloseableIterator<T> underlyingIterator, Collection<com.google.common.base.Predicate<T>> predicates)
-
-
Method Detail
-
close
public void close()
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Specified by:
close
in interfacehtsjdk.samtools.util.CloseableIterator<T>
-
-