Interface ReIterator<T>

Type Parameters:
T - the type of elements returned by this iterator
All Superinterfaces:
Iterator<T>
All Known Implementing Classes:
MappingReIterator

public interface ReIterator<T> extends Iterator<T>
The ReIterator interface represents a reusable Iterator.

Implementing this interface allows an Iterator to be reset to its initial position.

  • Method Summary

    Modifier and Type
    Method
    Description
    long
    Resets the iterator to its initial position.

    Methods inherited from interface java.util.Iterator

    forEachRemaining, hasNext, next, remove
  • Method Details

    • reset

      long reset()

      Resets the iterator to its initial position.

      Additionally, this method returns the size of the underlying data collection.

      Returns:
      The size of the underlying data collection.