org.eclipse.net4j.util.collection
Class PredicateIterator<T>

java.lang.Object
  extended by org.eclipse.net4j.util.collection.AbstractIterator<T>
      extended by org.eclipse.net4j.util.collection.AbstractFilteredIterator<T>
          extended by org.eclipse.net4j.util.collection.PredicateIterator<T>
All Implemented Interfaces:
Iterator<T>

public class PredicateIterator<T>
extends AbstractFilteredIterator<T>

Since:
3.3

Field Summary
 
Fields inherited from class org.eclipse.net4j.util.collection.AbstractIterator
END_OF_DATA
 
Constructor Summary
PredicateIterator(Iterator<T> delegate, Predicate<? super T> predicate)
           
 
Method Summary
 Predicate<? super T> getPredicate()
           
protected  boolean isValid(T element)
           
 
Methods inherited from class org.eclipse.net4j.util.collection.AbstractFilteredIterator
computeNextElement
 
Methods inherited from class org.eclipse.net4j.util.collection.AbstractIterator
hasNext, next, remove
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PredicateIterator

public PredicateIterator(Iterator<T> delegate,
                         Predicate<? super T> predicate)
Method Detail

getPredicate

public Predicate<? super T> getPredicate()

isValid

protected boolean isValid(T element)
Specified by:
isValid in class AbstractFilteredIterator<T>


Copyright (c) 2011, 2012 Eike Stepper (Berlin, Germany) and others.