Class AbstractIterator<E>

    • Constructor Detail

      • AbstractIterator

        public AbstractIterator()
    • Method Detail

      • hasNext

        public boolean hasNext()
        Specified by:
        hasNext in interface Iterator<E>
      • next

        public E next()
        Specified by:
        next in interface Iterator<E>
      • fetch

        protected abstract E fetch()
        Fetch next element. The implementation must return done() when all elements have been fetched.
        Returns:
        Returns the next value for the iterator or chain-calls done().
      • done

        protected final E done()
        Call when done.
        Returns:
        Returns a unique sentinel value to indicate end-of-iteration.