Class 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 Detail

      • 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 Detail

      • 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 Detail

      • 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