|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.commons.collections.iterators.FilterListIterator
public class FilterListIterator
Decorates another ListIterator
using a predicate to filter elements.
This iterator decorates the underlying iterator, only allowing through
those elements that match the specified Predicate
.
Constructor Summary | |
---|---|
FilterListIterator()
Constructs a new FilterListIterator that will not function
until setListIterator
and setPredicate are invoked. |
|
FilterListIterator(java.util.ListIterator iterator)
Constructs a new FilterListIterator that will not
function until setPredicate is invoked. |
|
FilterListIterator(java.util.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(java.lang.Object o)
Not supported. |
java.util.ListIterator |
getListIterator()
Gets the iterator this iterator is using. |
Predicate |
getPredicate()
Gets the predicate this iterator is using. |
boolean |
hasNext()
|
boolean |
hasPrevious()
|
java.lang.Object |
next()
|
int |
nextIndex()
|
java.lang.Object |
previous()
|
int |
previousIndex()
|
void |
remove()
Not supported. |
void |
set(java.lang.Object o)
Not supported. |
void |
setListIterator(java.util.ListIterator iterator)
Sets the iterator for this iterator to use. |
void |
setPredicate(Predicate predicate)
Sets the predicate this the iterator to use. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FilterListIterator()
FilterListIterator
that will not function
until setListIterator
and setPredicate
are invoked.
public FilterListIterator(java.util.ListIterator iterator)
FilterListIterator
that will not
function until setPredicate
is invoked.
iterator
- the iterator to usepublic FilterListIterator(java.util.ListIterator iterator, Predicate predicate)
FilterListIterator
.
iterator
- the iterator to usepredicate
- the predicate to usepublic FilterListIterator(Predicate predicate)
FilterListIterator
that will not function
until setListIterator
is invoked.
predicate
- the predicate to use.Method Detail |
---|
public void add(java.lang.Object o)
add
in interface java.util.ListIterator
public boolean hasNext()
hasNext
in interface java.util.Iterator
hasNext
in interface java.util.ListIterator
public boolean hasPrevious()
hasPrevious
in interface java.util.ListIterator
public java.lang.Object next()
next
in interface java.util.Iterator
next
in interface java.util.ListIterator
public int nextIndex()
nextIndex
in interface java.util.ListIterator
public java.lang.Object previous()
previous
in interface java.util.ListIterator
public int previousIndex()
previousIndex
in interface java.util.ListIterator
public void remove()
remove
in interface java.util.Iterator
remove
in interface java.util.ListIterator
public void set(java.lang.Object o)
set
in interface java.util.ListIterator
public java.util.ListIterator getListIterator()
public void setListIterator(java.util.ListIterator iterator)
iterator
- the iterator to usepublic Predicate getPredicate()
public void setPredicate(Predicate predicate)
predicate
- the transformer to use
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |