CloseableIterator<SAMRecord>, Closeable, AutoCloseable, Iterator<SAMRecord>FilteringIteratorpublic class FilteringSamIterator extends Object implements CloseableIterator<SAMRecord>
| Constructor | Description |
|---|---|
FilteringSamIterator(Iterator<SAMRecord> iterator,
SamRecordFilter filter) |
Constructor
|
FilteringSamIterator(Iterator<SAMRecord> iterator,
SamRecordFilter filter,
boolean filterByPair) |
Constructor
|
| Modifier and Type | Method | Description |
|---|---|---|
void |
close() |
Should be implemented to close/release any underlying resources.
|
boolean |
hasNext() |
Returns true if the iteration has more elements.
|
SAMRecord |
next() |
Returns the next element in the iteration.
|
void |
remove() |
Required method for Iterator API.
|
stream, toListforEachRemainingpublic FilteringSamIterator(Iterator<SAMRecord> iterator, SamRecordFilter filter, boolean filterByPair)
iterator - the backing iteratorfilter - the filter (which may be a FilterAggregator)filterByPair - if true, filter reads in pairspublic FilteringSamIterator(Iterator<SAMRecord> iterator, SamRecordFilter filter)
iterator - the backing iteratorfilter - the filter (which may be a FilterAggregator)public boolean hasNext()
public SAMRecord next()
next in interface Iterator<SAMRecord>NoSuchElementExceptionpublic void remove()
remove in interface Iterator<SAMRecord>UnsupportedOperationExceptionpublic void close()
CloseableIteratorclose in interface AutoCloseableclose in interface Closeableclose in interface CloseableIterator<SAMRecord>