Package vcf

Class IntervalVcfIt<E extends MarkerContainer>

  • Type Parameters:
    E - the type parameter
    All Implemented Interfaces:
    FileIt<E>, SampleFileIt<E>, java.io.Closeable, java.lang.AutoCloseable, java.util.Iterator<E>

    public final class IntervalVcfIt<E extends MarkerContainer>
    extends java.lang.Object
    implements SampleFileIt<E>

    Class IntervalVcfIterator is a sample file iterator whose next() method returns a marker container.

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void close()
      Stops reading data elements and releases any system resources that are held by this object.
      java.io.File file()
      Returns the file from which the data are read, or null if the data are read from standard input or if the data source is unknown.
      boolean hasNext()
      Returns true if the iteration has more elements.
      E next()
      Returns the next element in the iteration.
      void remove()
      The remove method is not supported by this iterator.
      Samples samples()
      Returns the list of samples.
      • Methods inherited from class java.lang.Object

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

        forEachRemaining
    • Constructor Detail

      • IntervalVcfIt

        public IntervalVcfIt​(SampleFileIt<E> it,
                             ChromInterval chromInt)
        Constructs a new IntervalVcfIterator instance.
        Parameters:
        it - an iterator whose next() method returns a marker container
        chromInt - a chromosome interval
        Throws:
        java.lang.NullPointerException - if it == null || interval == null
    • Method Detail

      • file

        public java.io.File file()
        Description copied from interface: FileIt
        Returns the file from which the data are read, or null if the data are read from standard input or if the data source is unknown.
        Specified by:
        file in interface FileIt<E extends MarkerContainer>
        Returns:
        the file from which the data are read, or null if the data are read from standard input or if the data source is unknown
      • hasNext

        public boolean hasNext()
        Returns true if the iteration has more elements.
        Specified by:
        hasNext in interface java.util.Iterator<E extends MarkerContainer>
        Returns:
        true if the iteration has more elements.
      • next

        public E next()
        Returns the next element in the iteration.
        Specified by:
        next in interface java.util.Iterator<E extends MarkerContainer>
        Returns:
        the next element in the iteration.
        Throws:
        java.util.NoSuchElementException - if the iteration has no more elements.
      • remove

        public void remove()
        The remove method is not supported by this iterator.
        Specified by:
        remove in interface java.util.Iterator<E extends MarkerContainer>
        Throws:
        java.lang.UnsupportedOperationException - if this method is invoked
      • close

        public void close()
        Description copied from interface: FileIt
        Stops reading data elements and releases any system resources that are held by this object. Buffered data elements may remain accessible via the hasNext() and next() methods after invoking close(). After invoking close(), further invocations of close() have no effect.
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface java.io.Closeable
        Specified by:
        close in interface FileIt<E extends MarkerContainer>