org.apache.commons.collections.iterators
Class FilterListIterator
- ListIterator
public class FilterListIterator
implements ListIterator
A proxy
ListIterator which
takes a
Predicate instance to filter
out objects from an underlying
ListIterator
instance. Only objects for which the specified
Predicate evaluates to
true are
returned by the iterator.
$Revision: 1.7 $ $Date: 2004/02/18 00:59:50 $
FilterListIterator
public FilterListIterator()
FilterListIterator
public FilterListIterator(ListIterator iterator)
Constructs a new
FilterListIterator that will not
function until
setPredicate is invoked.
iterator - the iterator to use
FilterListIterator
public FilterListIterator(ListIterator iterator,
Predicate predicate) Constructs a new FilterListIterator.
iterator - the iterator to usepredicate - the predicate to use
FilterListIterator
public FilterListIterator(Predicate predicate)
Constructs a new
FilterListIterator that will not
function until
setListIterator
is invoked.
predicate - the predicate to use.
add
public void add(Object o)
Not supported.
getListIterator
public ListIterator getListIterator()
Gets the iterator this iterator is using.
getPredicate
public Predicate getPredicate()
Gets the predicate this iterator is using.
hasNext
public boolean hasNext()
hasPrevious
public boolean hasPrevious()
nextIndex
public int nextIndex()
previous
public Object previous()
previousIndex
public int previousIndex()
remove
public void remove()
Not supported.
set
public void set(Object o)
Not supported.
setListIterator
public void setListIterator(ListIterator iterator)
Sets the iterator for this iterator to use.
If iteration has started, this effectively resets the iterator.
iterator - the iterator to use
setPredicate
public void setPredicate(Predicate predicate)
Sets the predicate this the iterator to use.
predicate - the transformer to use
Copyright © 2001-2006 Apache Software Foundation. All Rights Reserved.