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 anotherListIteratorusing 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 newFilterListIteratorthat will not function untilsetListIteratorandsetPredicateare invoked.FilterListIterator(ListIterator iterator)Deprecated.Constructs a newFilterListIteratorthat will not function untilsetPredicateis invoked.FilterListIterator(ListIterator iterator, Predicate predicate)Deprecated.Constructs a newFilterListIterator.FilterListIterator(Predicate predicate)Deprecated.Constructs a newFilterListIteratorthat will not function untilsetListIteratoris invoked.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidadd(Object o)Deprecated.Not supported.ListIteratorgetListIterator()Deprecated.Gets the iterator this iterator is using.PredicategetPredicate()Deprecated.Gets the predicate this iterator is using.booleanhasNext()Deprecated.booleanhasPrevious()Deprecated.Objectnext()Deprecated.intnextIndex()Deprecated.Objectprevious()Deprecated.intpreviousIndex()Deprecated.voidremove()Deprecated.Not supported.voidset(Object o)Deprecated.Not supported.voidsetListIterator(ListIterator iterator)Deprecated.Sets the iterator for this iterator to use.voidsetPredicate(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 newFilterListIteratorthat will not function untilsetListIteratorandsetPredicateare invoked.
-
FilterListIterator
public FilterListIterator(ListIterator iterator)
Deprecated.Constructs a newFilterListIteratorthat will not function untilsetPredicateis 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 newFilterListIteratorthat will not function untilsetListIteratoris invoked.- Parameters:
predicate- the predicate to use.
-
-
Method Detail
-
add
public void add(Object o)
Deprecated.Not supported.- Specified by:
addin interfaceListIterator
-
hasNext
public boolean hasNext()
Deprecated.- Specified by:
hasNextin interfaceIterator- Specified by:
hasNextin interfaceListIterator
-
hasPrevious
public boolean hasPrevious()
Deprecated.- Specified by:
hasPreviousin interfaceListIterator
-
next
public Object next()
Deprecated.- Specified by:
nextin interfaceIterator- Specified by:
nextin interfaceListIterator
-
nextIndex
public int nextIndex()
Deprecated.- Specified by:
nextIndexin interfaceListIterator
-
previous
public Object previous()
Deprecated.- Specified by:
previousin interfaceListIterator
-
previousIndex
public int previousIndex()
Deprecated.- Specified by:
previousIndexin interfaceListIterator
-
remove
public void remove()
Deprecated.Not supported.- Specified by:
removein interfaceIterator- Specified by:
removein interfaceListIterator
-
set
public void set(Object o)
Deprecated.Not supported.- Specified by:
setin 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
-
-