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 Details

    • 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 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

      public SAMRecord 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 interface AutoCloseable
      Specified by:
      close in interface Closeable
      Specified by:
      close in interface CloseableIterator<SAMRecord>
    • assertOpen

      protected void assertOpen()
    • remove

      public void remove()
      Specified by:
      remove in interface Iterator<SAMRecord>