Interface GenericIterator.Iterable<T>

All Superinterfaces:
Iterable<T>, SplitableIterable<T>
All Known Implementing Classes:
LeafNode
Enclosing class:
GenericIterator<T>

public static interface GenericIterator.Iterable<T> extends SplitableIterable<T>
Interface for collections that can be iterated over by GenericIterator using State objects to track the progress of the iteration. These do not need to be thread safe.
  • Method Details

    • iterateOverRange

      @Nullable GenericIterator.State<T> iterateOverRange(@Nullable GenericIterator.State<T> parent, int offset, int limit)
      Create a State to iterate over the specified range of values if possible. Can return null if no more values are available. The range must be valid for the collection being iterated over. The returned State will return the parent as its result when iteration over the range is completed.
      Parameters:
      parent - State to return to once the request iteration completes
      offset - starting point for iteration
      limit - stopping point for iteration
      Returns:
      null or a valid state
    • iterableSize

      int iterableSize()
    • iterator

      @Nonnull default SplitableIterator<T> iterator()
      Specified by:
      iterator in interface Iterable<T>
      Specified by:
      iterator in interface SplitableIterable<T>
    • streamable

      @Nonnull default IStreamable<T> streamable(int characteristics)