org.apache.chemistry.opencmis.jcr.util
Class FilterIterator<T>
java.lang.Object
org.apache.chemistry.opencmis.jcr.util.FilterIterator<T>
- Type Parameters:
T -
- All Implemented Interfaces:
- Iterator<T>
public class FilterIterator<T>
- extends Object
- implements Iterator<T>
Iterator filtering out items which do not match a given predicate.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FilterIterator
public FilterIterator(Iterator<T> iterator,
Predicate<T> predicate)
- Create a new filtered iterator based on the given
iterator.
- Parameters:
iterator - iterator to filterpredicate - only item matching this predicate are included
hasNext
public boolean hasNext()
- Specified by:
hasNext in interface Iterator<T>
next
public T next()
- Specified by:
next in interface Iterator<T>
remove
public void remove()
- Specified by:
remove in interface Iterator<T>
Copyright © 2009-2011 The Apache Software Foundation. All Rights Reserved.