Class BufferedIterator<T>

  • All Implemented Interfaces:
    Iterator<T>
    Direct Known Subclasses:
    SimpleIterator

    public class BufferedIterator<T>
    extends Object
    implements Iterator<T>
    This iterator allows next method to be called before it has all its elements.
    • Constructor Detail

      • BufferedIterator

        public BufferedIterator()
    • Method Detail

      • add

        public void add​(T entry)
      • add

        public void add​(List<T> entry)
      • isDone

        public void isDone()
      • next

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

        public boolean hasNext()
        Specified by:
        hasNext in interface Iterator<T>
      • remove

        public void remove()
        Specified by:
        remove in interface Iterator<T>