Class FilterListIterator
- java.lang.Object
-
- org.apache.commons.collections.iterators.FilterListIterator
-
- All Implemented Interfaces:
java.util.Iterator
,java.util.ListIterator
@Deprecated(since="2021-04-30") public class FilterListIterator extends java.lang.Object implements java.util.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(java.util.ListIterator iterator)
Deprecated.Constructs a newFilterListIterator
that will not function untilsetPredicate
is invoked.FilterListIterator(java.util.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(java.lang.Object o)
Deprecated.Not supported.java.util.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.java.lang.Object
next()
Deprecated.int
nextIndex()
Deprecated.java.lang.Object
previous()
Deprecated.int
previousIndex()
Deprecated.void
remove()
Deprecated.Not supported.void
set(java.lang.Object o)
Deprecated.Not supported.void
setListIterator(java.util.ListIterator iterator)
Deprecated.Sets the iterator for this iterator to use.void
setPredicate(Predicate predicate)
Deprecated.Sets the predicate this the iterator to use.
-
-
-
Constructor Detail
-
FilterListIterator
public FilterListIterator()
Deprecated.Constructs a newFilterListIterator
that will not function untilsetListIterator
andsetPredicate
are invoked.
-
FilterListIterator
public FilterListIterator(java.util.ListIterator iterator)
Deprecated.Constructs a newFilterListIterator
that will not function untilsetPredicate
is invoked.- Parameters:
iterator
- the iterator to use
-
FilterListIterator
public FilterListIterator(java.util.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(java.lang.Object o)
Deprecated.Not supported.- Specified by:
add
in interfacejava.util.ListIterator
-
hasNext
public boolean hasNext()
Deprecated.- Specified by:
hasNext
in interfacejava.util.Iterator
- Specified by:
hasNext
in interfacejava.util.ListIterator
-
hasPrevious
public boolean hasPrevious()
Deprecated.- Specified by:
hasPrevious
in interfacejava.util.ListIterator
-
next
public java.lang.Object next()
Deprecated.- Specified by:
next
in interfacejava.util.Iterator
- Specified by:
next
in interfacejava.util.ListIterator
-
nextIndex
public int nextIndex()
Deprecated.- Specified by:
nextIndex
in interfacejava.util.ListIterator
-
previous
public java.lang.Object previous()
Deprecated.- Specified by:
previous
in interfacejava.util.ListIterator
-
previousIndex
public int previousIndex()
Deprecated.- Specified by:
previousIndex
in interfacejava.util.ListIterator
-
remove
public void remove()
Deprecated.Not supported.- Specified by:
remove
in interfacejava.util.Iterator
- Specified by:
remove
in interfacejava.util.ListIterator
-
set
public void set(java.lang.Object o)
Deprecated.Not supported.- Specified by:
set
in interfacejava.util.ListIterator
-
getListIterator
public java.util.ListIterator getListIterator()
Deprecated.Gets the iterator this iterator is using.- Returns:
- the iterator.
-
setListIterator
public void setListIterator(java.util.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
-
-