Class BinSeqFileIterator<T extends BinarySequence>

  • Type Parameters:
    T -
    All Implemented Interfaces:
    java.lang.Iterable<T>, java.util.Iterator<T>
    Direct Known Subclasses:
    DnaSeqFileIterator, DnaSeqIdFileIterator, DnaSeqPeFileIterator

    public class BinSeqFileIterator<T extends BinarySequence>
    extends java.lang.Object
    implements java.lang.Iterable<T>, java.util.Iterator<T>
    Reads all sequences from a file Warning: You should always call "close()" at the end of the iteration.
    Author:
    pcingola
    • Constructor Summary

      Constructors 
      Constructor Description
      BinSeqFileIterator​(java.lang.String fileName)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void close()
      Close file (if not already done)
      boolean hasNext()  
      java.util.Iterator<T> iterator()  
      T next()  
      void remove()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface java.lang.Iterable

        forEach, spliterator
      • Methods inherited from interface java.util.Iterator

        forEachRemaining
    • Constructor Detail

      • BinSeqFileIterator

        public BinSeqFileIterator​(java.lang.String fileName)
    • Method Detail

      • close

        public void close()
        Close file (if not already done)
      • hasNext

        public boolean hasNext()
        Specified by:
        hasNext in interface java.util.Iterator<T extends BinarySequence>
      • iterator

        public java.util.Iterator<T> iterator()
        Specified by:
        iterator in interface java.lang.Iterable<T extends BinarySequence>
      • next

        public T next()
        Specified by:
        next in interface java.util.Iterator<T extends BinarySequence>
      • remove

        public void remove()
        Specified by:
        remove in interface java.util.Iterator<T extends BinarySequence>