T - the Iterator generic typepublic final class FilteredIterator<T> extends Object implements Iterator<T>
| Constructor and Description |
|---|
FilteredIterator(Iterator<? extends T> iterator,
Predicate<? super T> predicate)
Create a new FilteredIterator.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
static <T> Iterator<T> |
filter(Iterator<? extends T> iter,
Predicate<? super T> pred)
Get a filtered Iterator instance applying
pred to iter. |
int |
hashCode() |
boolean |
hasNext() |
T |
next() |
void |
remove() |
String |
toString() |
public FilteredIterator(Iterator<? extends T> iterator, Predicate<? super T> predicate)
iterator - to filterpredicate - to applypublic boolean hasNext()
hasNext in interface Iterator<T>Iterator.hasNext()public void remove()
remove in interface Iterator<T>Iterator.remove()Copyright © 2003–2014 The Apache Software Foundation. All rights reserved.