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 SAMRecord
The 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, wait
Methods inherited from interface htsjdk.samtools.util.CloseableIterator
stream, toList
Methods 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:CloseableIterator
Should be implemented to close/release any underlying resources.- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Specified by:
close
in interfaceCloseableIterator<SAMRecord>
-
assertOpen
protected void assertOpen() -
remove
public void remove()
-