Class IteratorBase<X>

  • All Implemented Interfaces:
    java.util.Iterator<X>, IteratorCloseable<X>, Closeable

    public abstract class IteratorBase<X>
    extends java.lang.Object
    implements IteratorCloseable<X>
    Iterator base class that adds "closeable" to an iterator. close() is always called, whether explicitly or by end-of-iterator.
    • Method Summary

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

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

        forEachRemaining, remove
    • Method Detail

      • hasNext

        public final boolean hasNext()
        Specified by:
        hasNext in interface java.util.Iterator<X>
      • next

        public final X next()
        Specified by:
        next in interface java.util.Iterator<X>
      • close

        public void close()
        Specified by:
        close in interface Closeable