Package blbutil

Interface FileIt<E>

  • Type Parameters:
    E - the type of the elements returned by this iterator's next() method.
    All Superinterfaces:
    java.lang.AutoCloseable, java.io.Closeable, java.util.Iterator<E>
    All Known Subinterfaces:
    SampleFileIt<E>
    All Known Implementing Classes:
    Bref3It, InputIt, IntervalVcfIt, RefIt, VcfIt, WindowIt

    public interface FileIt<E>
    extends java.util.Iterator<E>, java.io.Closeable

    An iterator for data elements in a file. If an IOExceptions is thrown while reading a file, the IOException is trapped, an appropriate error message is written to standard out, and the Java Virtual Machine is terminated. The Iterator.remove() method is unsupported and throws an UnsupportedOperationException.

    When the FileIterator object is no longer needed, the close() method should be invoked to release any system resources controlled by the object. After calling close(), invoking hasNext() returns false, and invoking next() will throw a NoSuchElementException.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void close()
      Terminates the iteration 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 are computed data.
      java.lang.String toString()
      Returns a string representation of this.
      • Methods inherited from interface java.util.Iterator

        forEachRemaining, hasNext, next, remove
    • Method Detail

      • file

        java.io.File file()
        Returns the file from which the data are read, or null if the data are read from standard input or are computed data.
        Returns:
        the file from which the data are read, or null if the data are read from standard input or are computed data
      • close

        void close()
        Terminates the iteration and releases any system resources that are held by this object. 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
      • toString

        java.lang.String toString()
        Returns a string representation of this. The exact details of the representation are unspecified and subject to change.
        Overrides:
        toString in class java.lang.Object
        Returns:
        a string representation of this