Class FilteringIterator<A>

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

    public final class FilteringIterator<A>
    extends ImmutableIterator<A>
    • Constructor Summary

      Constructors 
      Constructor Description
      FilteringIterator​(Fn1<? super A,​? extends java.lang.Boolean> predicate, java.util.Iterator<A> iterator)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      private boolean hasMoreMatchingElements()  
      boolean hasNext()  
      A next()  
      • 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
    • Field Detail

      • predicate

        private final Fn1<? super A,​? extends java.lang.Boolean> predicate
    • Constructor Detail

      • FilteringIterator

        public FilteringIterator​(Fn1<? super A,​? extends java.lang.Boolean> predicate,
                                 java.util.Iterator<A> iterator)
    • Method Detail

      • hasNext

        public boolean hasNext()
      • next

        public A next()
      • hasMoreMatchingElements

        private boolean hasMoreMatchingElements()