Class FileLinesMutableStringIterable.FileLinesIterator

  • All Implemented Interfaces:
    SafelyCloseable, java.io.Closeable, java.lang.AutoCloseable, java.util.Iterator<MutableString>
    Enclosing class:
    FileLinesMutableStringIterable

    public static final class FileLinesMutableStringIterable.FileLinesIterator
    extends java.lang.Object
    implements java.util.Iterator<MutableString>, SafelyCloseable
    An iterator over the lines of a FileLinesMutableStringIterable.

    Instances of this class open an input stream, and thus should be closed after usage. A “safety-net” finaliser tries to take care of the cases in which closing an instance is impossible. An exhausted iterator, however, will be closed automagically.

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void close()  
      protected void finalize()  
      boolean hasNext()  
      MutableString next()  
      void remove()  
      • Methods inherited from class java.lang.Object

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

        forEachRemaining
    • Method Detail

      • hasNext

        public boolean hasNext()
        Specified by:
        hasNext in interface java.util.Iterator<MutableString>
      • remove

        public void remove()
        Specified by:
        remove in interface java.util.Iterator<MutableString>
      • close

        public void close()
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface java.io.Closeable
      • finalize

        protected void finalize()
                         throws java.lang.Throwable
        Overrides:
        finalize in class java.lang.Object
        Throws:
        java.lang.Throwable