Class FilterListIterator
- java.lang.Object
-
- org.apache.commons.collections.iterators.FilterListIterator
-
- All Implemented Interfaces:
Iterator
,ListIterator
@Deprecated(since="2021-04-30") public class FilterListIterator extends Object implements ListIterator
Deprecated.Commons Collections 3 is in maintenance mode. Commons Collections 4 should be used instead.Decorates anotherListIterator
using a predicate to filter elements.This iterator decorates the underlying iterator, only allowing through those elements that match the specified
Predicate
.- Since:
- Commons Collections 2.0
-
-
Constructor Summary
Constructors Constructor Description FilterListIterator()
Deprecated.Constructs a newFilterListIterator
that will not function untilsetListIterator
andsetPredicate
are invoked.FilterListIterator(ListIterator iterator)
Deprecated.Constructs a newFilterListIterator
that will not function untilsetPredicate
is invoked.FilterListIterator(ListIterator iterator, Predicate predicate)
Deprecated.Constructs a newFilterListIterator
.FilterListIterator(Predicate predicate)
Deprecated.Constructs a newFilterListIterator
that will not function untilsetListIterator
is invoked.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
add(Object o)
Deprecated.Not supported.ListIterator
getListIterator()
Deprecated.Gets the iterator this iterator is using.Predicate
getPredicate()
Deprecated.Gets the predicate this iterator is using.boolean
hasNext()
Deprecated.boolean
hasPrevious()
Deprecated.Object
next()
Deprecated.int
nextIndex()
Deprecated.Object
previous()
Deprecated.int
previousIndex()
Deprecated.void
remove()
Deprecated.Not supported.void
set(Object o)
Deprecated.Not supported.void
setListIterator(ListIterator iterator)
Deprecated.Sets the iterator for this iterator to use.void
setPredicate(Predicate predicate)
Deprecated.Sets the predicate this the iterator to use.-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.util.Iterator
forEachRemaining
-
-
-
-
Constructor Detail
-
FilterListIterator
public FilterListIterator()
Deprecated.Constructs a newFilterListIterator
that will not function untilsetListIterator
andsetPredicate
are invoked.
-
FilterListIterator
public FilterListIterator(ListIterator iterator)
Deprecated.Constructs a newFilterListIterator
that will not function untilsetPredicate
is invoked.- Parameters:
iterator
- the iterator to use
-
FilterListIterator
public FilterListIterator(ListIterator iterator, Predicate predicate)
Deprecated.Constructs a newFilterListIterator
.- Parameters:
iterator
- the iterator to usepredicate
- the predicate to use
-
FilterListIterator
public FilterListIterator(Predicate predicate)
Deprecated.Constructs a newFilterListIterator
that will not function untilsetListIterator
is invoked.- Parameters:
predicate
- the predicate to use.
-
-
Method Detail
-
add
public void add(Object o)
Deprecated.Not supported.- Specified by:
add
in interfaceListIterator
-
hasNext
public boolean hasNext()
Deprecated.- Specified by:
hasNext
in interfaceIterator
- Specified by:
hasNext
in interfaceListIterator
-
hasPrevious
public boolean hasPrevious()
Deprecated.- Specified by:
hasPrevious
in interfaceListIterator
-
next
public Object next()
Deprecated.- Specified by:
next
in interfaceIterator
- Specified by:
next
in interfaceListIterator
-
nextIndex
public int nextIndex()
Deprecated.- Specified by:
nextIndex
in interfaceListIterator
-
previous
public Object previous()
Deprecated.- Specified by:
previous
in interfaceListIterator
-
previousIndex
public int previousIndex()
Deprecated.- Specified by:
previousIndex
in interfaceListIterator
-
remove
public void remove()
Deprecated.Not supported.- Specified by:
remove
in interfaceIterator
- Specified by:
remove
in interfaceListIterator
-
set
public void set(Object o)
Deprecated.Not supported.- Specified by:
set
in interfaceListIterator
-
getListIterator
public ListIterator getListIterator()
Deprecated.Gets the iterator this iterator is using.- Returns:
- the iterator.
-
setListIterator
public void setListIterator(ListIterator iterator)
Deprecated.Sets the iterator for this iterator to use. If iteration has started, this effectively resets the iterator.- Parameters:
iterator
- the iterator to use
-
getPredicate
public Predicate getPredicate()
Deprecated.Gets the predicate this iterator is using.- Returns:
- the predicate.
-
setPredicate
public void setPredicate(Predicate predicate)
Deprecated.Sets the predicate this the iterator to use.- Parameters:
predicate
- the transformer to use
-
-