Class AbstractLazyLoadingIterator<T>

  • Type Parameters:
    T -
    All Implemented Interfaces:
    Iterator<T>

    public abstract class AbstractLazyLoadingIterator<T>
    extends Object
    implements Iterator<T>
    Implementation an Iterator which uses the lazy loading pattern to retrieve one batch of results at a time.
    • Constructor Detail

      • AbstractLazyLoadingIterator

        public AbstractLazyLoadingIterator()
    • Method Detail

      • hasNext

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

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

        protected void onNext​(T next)
      • remove

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

        protected abstract Iterator<T> fetchNext()