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.
Apache Commons Collections version 3.x is being deprecated from AEMaaCS. The upgraded version 4.4 of Commons Collections is already included as replacement. Customers are advised to upgrade to this version of the library. Please note: the package name was changed to org.apache.commons.collections4. Further note that there are AEM APIs currently exposing the old collections classes; these will be updated in upcoming releases.
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.

Since:
Commons Collections 2.0
  • Constructor Details

    • FilterListIterator

      public FilterListIterator()
      Deprecated.
      Constructs a new FilterListIterator that will not function until setListIterator and setPredicate are invoked.
    • FilterListIterator

      public FilterListIterator(ListIterator iterator)
      Deprecated.
      Constructs a new FilterListIterator that will not function until setPredicate is invoked.
      Parameters:
      iterator - the iterator to use
    • FilterListIterator

      public FilterListIterator(ListIterator iterator, Predicate predicate)
      Deprecated.
      Constructs a new FilterListIterator.
      Parameters:
      iterator - the iterator to use
      predicate - the predicate to use
    • FilterListIterator

      public FilterListIterator(Predicate predicate)
      Deprecated.
      Constructs a new FilterListIterator that will not function until setListIterator is invoked.
      Parameters:
      predicate - the predicate to use.
  • Method Details

    • add

      public void add(Object o)
      Deprecated.
      Not supported.
      Specified by:
      add in interface ListIterator
    • hasNext

      public boolean hasNext()
      Deprecated.
      Specified by:
      hasNext in interface Iterator
      Specified by:
      hasNext in interface ListIterator
    • hasPrevious

      public boolean hasPrevious()
      Deprecated.
      Specified by:
      hasPrevious in interface ListIterator
    • next

      public Object next()
      Deprecated.
      Specified by:
      next in interface Iterator
      Specified by:
      next in interface ListIterator
    • nextIndex

      public int nextIndex()
      Deprecated.
      Specified by:
      nextIndex in interface ListIterator
    • previous

      public Object previous()
      Deprecated.
      Specified by:
      previous in interface ListIterator
    • previousIndex

      public int previousIndex()
      Deprecated.
      Specified by:
      previousIndex in interface ListIterator
    • remove

      public void remove()
      Deprecated.
      Not supported.
      Specified by:
      remove in interface Iterator
      Specified by:
      remove in interface ListIterator
    • set

      public void set(Object o)
      Deprecated.
      Not supported.
      Specified by:
      set in interface ListIterator
    • 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