Class StoppableIterator<T>

java.lang.Object
ch.njol.util.coll.iterator.StoppableIterator<T>
All Implemented Interfaces:
Iterator<T>

@Deprecated(since="2.10.2", forRemoval=true) public class StoppableIterator<T> extends Object implements Iterator<T>
Deprecated, for removal: This API element is subject to removal in a future version.
unused
  • Constructor Summary

    Constructors
    Constructor
    Description
    StoppableIterator(Iterator<T> iter, NullableChecker<T> stopper, boolean returnLast)
    Deprecated, for removal: This API element is subject to removal in a future version.
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    void
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    void
    Deprecated, for removal: This API element is subject to removal in a future version.
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface java.util.Iterator

    forEachRemaining
  • Constructor Details

    • StoppableIterator

      public StoppableIterator(Iterator<T> iter, NullableChecker<T> stopper, boolean returnLast)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Parameters:
      iter -
      stopper - Called for every element. If it returns true the iteration is stopped.
      returnLast - Whether to return the last element, i.e. the element on which the stopper stops. This doesn't change anything if the iterator ends before the stopper stops.
  • Method Details

    • hasNext

      public boolean hasNext()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Specified by:
      hasNext in interface Iterator<T>
    • next

      @Nullable public T next()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Specified by:
      next in interface Iterator<T>
    • remove

      public void remove()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Specified by:
      remove in interface Iterator<T>
    • stop

      public void stop()
      Deprecated, for removal: This API element is subject to removal in a future version.