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
Pull SAMRecords from a coordinate-sorted iterator, and filter out any that do not match the filter.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected SAMRecordThe next record to be returned.protected final CloseableIterator<SAMRecord>The wrapped iterator. -
Constructor Summary
ConstructorsConstructorDescriptionBAMQueryFilteringIterator(CloseableIterator<SAMRecord> iterator, htsjdk.samtools.BAMIteratorFilter iteratorFilter) -
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
-
Field Details
-
wrappedIterator
The wrapped iterator. -
mNextRecord
The next record to be returned. Will be null if no such record exists.
-
-
Constructor Details
-
BAMQueryFilteringIterator
public BAMQueryFilteringIterator(CloseableIterator<SAMRecord> iterator, htsjdk.samtools.BAMIteratorFilter iteratorFilter)
-
-
Method Details
-
hasNext
public boolean hasNext()Returns true if a next element exists; false otherwise. -
next
Gets the next record from the given iterator.- Returns:
- The next SAM record in the iterator.
-
close
public void close()Description copied from interface:CloseableIteratorShould be implemented to close/release any underlying resources.- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein interfaceCloseableIterator<SAMRecord>
-
assertOpen
protected void assertOpen() -
remove
public void remove()
-