Class LazyCollection.CachingIterator

    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected int i  
      protected java.util.Iterator<E> inner  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean hasNext()
      E next()
      protected void updateCache​(E next)
      Updates the cache with next.
      • Methods inherited from class java.lang.Object

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

        forEachRemaining
    • Field Detail

      • inner

        protected final java.util.Iterator<E> inner
      • i

        protected int i
    • Constructor Detail

      • CachingIterator

        public CachingIterator​(java.util.Iterator<E> inner)
        Creates a new LazyCollection.CachingIterator around inner.
        Parameters:
        inner - the underlying collection iterator
    • Method Detail

      • hasNext

        public boolean hasNext()
      • next

        public E next()
      • updateCache

        protected final void updateCache​(E next)
        Updates the cache with next.
        Parameters:
        next - the next element returned by this iterator