Class AbstractIterator<T>

java.lang.Object
io.vavr.collection.AbstractIterator<T>
Type Parameters:
T - Component type
All Implemented Interfaces:
Foldable<T>, Iterator<T>, Traversable<T>, Value<T>, Iterable<T>, Iterator<T>
Direct Known Subclasses:
BitSetModule.BitSetIterator, HashArrayMappedTrieModule.LeafNodeIterator, IteratorModule.CachedIterator, IteratorModule.ConcatIterator, IteratorModule.DistinctIterator, StreamModule.StreamIterator

abstract class AbstractIterator<T> extends Object implements Iterator<T>
Provides a common Object.toString() implementation.

equals(Object) and hashCode() are intentionally not overridden in order to prevent this iterator from being evaluated. In other words, (identity-)equals and hashCode are implemented by Object.

  • Constructor Details

    • AbstractIterator

      AbstractIterator()
  • Method Details

    • toString

      public String toString()
      Description copied from interface: Value
      Clarifies that values have a proper toString() method implemented.

      See Object.toString().

      Specified by:
      toString in interface Value<T>
      Overrides:
      toString in class Object
      Returns:
      A String representation of this object
    • getNext

      protected abstract T getNext()
    • next

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