Class Sieved<E>

  • All Implemented Interfaces:
    java.util.Iterator<E>

    public final class Sieved<E>
    extends BaseIterator<E>
    Iterator decorator which iterates all elements of the delegate which satisfy a given Predicate.
    • Constructor Summary

      Constructors 
      Constructor Description
      Sieved​(Predicate<? super E> predicate, java.util.Iterator<E> delegate)
      Creates a sieved Iterator which iterates the elements of the given Iterator which match the given Predicate.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean hasNext()  
      E next()  
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface java.util.Iterator

        forEachRemaining
    • Constructor Detail

      • Sieved

        public Sieved​(Predicate<? super E> predicate,
                      java.util.Iterator<E> delegate)
        Creates a sieved Iterator which iterates the elements of the given Iterator which match the given Predicate.
        Parameters:
        predicate - The Predicate.
        delegate - The Iterator to be sieved.
    • Method Detail

      • hasNext

        public final boolean hasNext()
      • next

        public final E next()