Class IteratorModule.CachedIterator<T>

java.lang.Object
io.vavr.collection.AbstractIterator<T>
io.vavr.collection.IteratorModule.CachedIterator<T>
All Implemented Interfaces:
Foldable<T>, Iterator<T>, Traversable<T>, Value<T>, Iterable<T>, Iterator<T>
Enclosing interface:
IteratorModule

public static final class IteratorModule.CachedIterator<T> extends AbstractIterator<T>
  • Field Details

    • that

      private final Iterator<T> that
    • next

      private T next
    • cached

      private boolean cached
  • Constructor Details

    • CachedIterator

      CachedIterator(Iterator<T> that)
  • Method Details

    • hasNext

      public boolean hasNext()
    • getNext

      public T getNext()
      Specified by:
      getNext in class AbstractIterator<T>
    • touch

      T touch()