Class IteratorTruncate<T>

  • All Implemented Interfaces:
    java.util.Iterator<T>, IteratorCloseable<T>, Closeable

    public final class IteratorTruncate<T>
    extends IteratorSlotted<T>
    Iterate while a condition is true, then stop. This iterator does not touch any elements after the first where the predicate is false.
    • Constructor Summary

      Constructors 
      Constructor Description
      IteratorTruncate​(java.util.Iterator<T> iter, java.util.function.Predicate<T> predicate)  
    • Method Summary

      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface java.util.Iterator

        forEachRemaining, remove
    • Constructor Detail

      • IteratorTruncate

        public IteratorTruncate​(java.util.Iterator<T> iter,
                                java.util.function.Predicate<T> predicate)