Class ConverterCollections.ConverterListIterator<F,T>

java.lang.Object
com.tangosol.util.ConverterCollections.ConverterListIterator<F,T>
Type Parameters:
F - the type of elements in the underlying ListIterator
T - the type that the elements should be converted to
All Implemented Interfaces:
Iterator<T>, ListIterator<T>
Enclosing class:
ConverterCollections

public static class ConverterCollections.ConverterListIterator<F,T> extends Object implements ListIterator<T>
A Converter ListIterator views an underlying ListIterator through a Converter.
  • Field Details

    • m_iter

      protected final ListIterator<F> m_iter
      The underlying ListIterator.
    • m_convUp

      protected final Converter<F,T> m_convUp
      The Converter from the underlying ListIterator to this ListIterator.
    • m_convDown

      protected final Converter<T,F> m_convDown
      The Converter from this ListIterator to the underlying ListIterator.
  • Constructor Details

    • ConverterListIterator

      public ConverterListIterator(ListIterator<F> iter, Converter<F,T> convUp, Converter<T,F> convDown)
      Constructor.
      Parameters:
      iter - the underlying ListIterator
      convUp - the Converter from the underlying ListIterator
      convDown - the Converter to the underlying ListIterator
  • Method Details

    • hasNext

      public boolean hasNext()
      Specified by:
      hasNext in interface Iterator<F>
      Specified by:
      hasNext in interface ListIterator<F>
    • next

      public T next()
      Specified by:
      next in interface Iterator<F>
      Specified by:
      next in interface ListIterator<F>
    • hasPrevious

      public boolean hasPrevious()
      Specified by:
      hasPrevious in interface ListIterator<F>
    • previous

      public T previous()
      Specified by:
      previous in interface ListIterator<F>
    • nextIndex

      public int nextIndex()
      Specified by:
      nextIndex in interface ListIterator<F>
    • previousIndex

      public int previousIndex()
      Specified by:
      previousIndex in interface ListIterator<F>
    • remove

      public void remove()
      Specified by:
      remove in interface Iterator<F>
      Specified by:
      remove in interface ListIterator<F>
    • set

      public void set(T o)
      Specified by:
      set in interface ListIterator<F>
    • add

      public void add(T o)
      Specified by:
      add in interface ListIterator<F>
    • getListIterator

      public ListIterator<F> getListIterator()
      Return the underlying ListIterator.
      Returns:
      the underlying ListIterator
    • getConverterUp

      public Converter<F,T> getConverterUp()
      Return the Converter used to view the underlying ListIterator's values through.
      Returns:
      the Converter from the underlying ListIterator
    • getConverterDown

      public Converter<T,F> getConverterDown()
      Return the Converter used to pass values down to the underlying ListIterator.
      Returns:
      the Converter to the underlying ListIterator