Class FilterListIterator<T>

  • Type Parameters:
    T - The element type of the list iterator
    All Implemented Interfaces:
    java.util.Iterator<T>, java.util.ListIterator<T>
    Direct Known Subclasses:
    ReverseListIterator

    public abstract class FilterListIterator<T>
    extends java.lang.Object
    implements java.util.ListIterator<T>
    An ListIterator that retrieves its elements from a delegate ListIterator. The default implementation simply passes all method invocations to the delegate.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected java.util.ListIterator<T> delegate  
    • Constructor Summary

      Constructors 
      Constructor Description
      FilterListIterator​(java.util.ListIterator<T> delegate)  
    • Constructor Detail

      • FilterListIterator

        public FilterListIterator​(java.util.ListIterator<T> delegate)
    • Method Detail

      • hasNext

        public boolean hasNext()
        Calls delegate.ListIterator.hasNext()
        Specified by:
        hasNext in interface java.util.Iterator<T>
        Specified by:
        hasNext in interface java.util.ListIterator<T>
      • next

        public T next()
        Calls delegate.ListIterator.next()
        Specified by:
        next in interface java.util.Iterator<T>
        Specified by:
        next in interface java.util.ListIterator<T>
      • hasPrevious

        public boolean hasPrevious()
        Calls delegate.ListIterator.hasPrevious()
        Specified by:
        hasPrevious in interface java.util.ListIterator<T>
      • previous

        public T previous()
        Calls delegate.ListIterator.previous()
        Specified by:
        previous in interface java.util.ListIterator<T>
      • nextIndex

        public int nextIndex()
        Calls delegate.ListIterator.nextIndex()
        Specified by:
        nextIndex in interface java.util.ListIterator<T>
      • previousIndex

        public int previousIndex()
        Calls delegate.ListIterator.previousIndex()
        Specified by:
        previousIndex in interface java.util.ListIterator<T>
      • remove

        public void remove()
        Calls delegate.ListIterator.remove()
        Specified by:
        remove in interface java.util.Iterator<T>
        Specified by:
        remove in interface java.util.ListIterator<T>
      • set

        public void set​(@Nullable
                        T o)
        Calls delegate.ListIterator.set(java.lang.Object)
        Specified by:
        set in interface java.util.ListIterator<T>
      • add

        public void add​(@Nullable
                        T o)
        Calls delegate.ListIterator.add(java.lang.Object)
        Specified by:
        add in interface java.util.ListIterator<T>