org.apache.commons.collections.iterators
public class FilterListIterator extends Object implements ListIterator
This iterator decorates the underlying iterator, only allowing through
those elements that match the specified Predicate.
Since: Commons Collections 2.0
Version: $Revision: 646777 $ $Date: 2008-04-10 13:33:15 +0100 (Thu, 10 Apr 2008) $
| Constructor Summary | |
|---|---|
| FilterListIterator()
Constructs a new FilterListIterator that will not function
until setListIterator
and setPredicate are invoked. | |
| FilterListIterator(ListIterator iterator)
Constructs a new FilterListIterator that will not
function until setPredicate is invoked.
| |
| FilterListIterator(ListIterator iterator, Predicate predicate)
Constructs a new FilterListIterator.
| |
| FilterListIterator(Predicate predicate)
Constructs a new FilterListIterator that will not function
until setListIterator is invoked.
| |
| Method Summary | |
|---|---|
| void | add(Object o) Not supported. |
| ListIterator | getListIterator()
Gets the iterator this iterator is using.
|
| Predicate | getPredicate()
Gets the predicate this iterator is using.
|
| boolean | hasNext() |
| boolean | hasPrevious() |
| Object | next() |
| int | nextIndex() |
| Object | previous() |
| int | previousIndex() |
| void | remove() Not supported. |
| void | set(Object o) Not supported. |
| void | setListIterator(ListIterator iterator)
Sets the iterator for this iterator to use.
|
| void | setPredicate(Predicate predicate)
Sets the predicate this the iterator to use.
|
FilterListIterator that will not function
until setListIterator
and setPredicate are invoked.FilterListIterator that will not
function until setPredicate is invoked.
Parameters: iterator the iterator to use
FilterListIterator.
Parameters: iterator the iterator to use predicate the predicate to use
FilterListIterator that will not function
until setListIterator is invoked.
Parameters: predicate the predicate to use.
Returns: the iterator.
Returns: the predicate.
Parameters: iterator the iterator to use
Parameters: predicate the transformer to use