Package htsjdk.samtools
Class BAMFileReader.BAMQueryFilteringIterator
- java.lang.Object
-
- htsjdk.samtools.BAMFileReader.BAMQueryFilteringIterator
-
- All Implemented Interfaces:
CloseableIterator<SAMRecord>
,Closeable
,AutoCloseable
,Iterator<SAMRecord>
- Enclosing class:
- BAMFileReader
public class BAMFileReader.BAMQueryFilteringIterator extends Object
Pull SAMRecords from a coordinate-sorted iterator, and filter out any that do not match the filter.
-
-
Field Summary
Fields Modifier and Type Field Description protected SAMRecord
mNextRecord
The next record to be returned.protected CloseableIterator<SAMRecord>
wrappedIterator
The wrapped iterator.
-
Constructor Summary
Constructors Constructor Description BAMQueryFilteringIterator(CloseableIterator<SAMRecord> iterator, htsjdk.samtools.BAMIteratorFilter iteratorFilter)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
hasNext()
Returns true if a next element exists; false otherwise.SAMRecord
next()
Gets the next record from the given iterator.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface htsjdk.samtools.util.CloseableIterator
stream, toList
-
Methods inherited from interface java.util.Iterator
forEachRemaining
-
-
-
-
Field Detail
-
wrappedIterator
protected final CloseableIterator<SAMRecord> wrappedIterator
The wrapped iterator.
-
mNextRecord
protected SAMRecord mNextRecord
The next record to be returned. Will be null if no such record exists.
-
-
Constructor Detail
-
BAMQueryFilteringIterator
public BAMQueryFilteringIterator(CloseableIterator<SAMRecord> iterator, htsjdk.samtools.BAMIteratorFilter iteratorFilter)
-
-
Method Detail
-
hasNext
public boolean hasNext()
Returns true if a next element exists; false otherwise.
-
next
public SAMRecord next()
Gets the next record from the given iterator.- Returns:
- The next SAM record in the iterator.
-
-