Package com.tangosol.util
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 ListIteratorT- 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 Summary
Fields Modifier and Type Field Description protected Converter<T,F>m_convDownThe Converter from this ListIterator to the underlying ListIterator.protected Converter<F,T>m_convUpThe Converter from the underlying ListIterator to this ListIterator.protected ListIterator<F>m_iterThe underlying ListIterator.
-
Constructor Summary
Constructors Constructor Description ConverterListIterator(ListIterator<F> iter, Converter<F,T> convUp, Converter<T,F> convDown)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd(T o)Converter<T,F>getConverterDown()Return the Converter used to pass values down to the underlying ListIterator.Converter<F,T>getConverterUp()Return the Converter used to view the underlying ListIterator's values through.ListIterator<F>getListIterator()Return the underlying ListIterator.booleanhasNext()booleanhasPrevious()Tnext()intnextIndex()Tprevious()intpreviousIndex()voidremove()voidset(T o)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.util.Iterator
forEachRemaining
-
-
-
-
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.
-
-
Method Detail
-
hasNext
public boolean hasNext()
-
next
public T next()
-
hasPrevious
public boolean hasPrevious()
- Specified by:
hasPreviousin interfaceListIterator<F>
-
previous
public T previous()
- Specified by:
previousin interfaceListIterator<F>
-
nextIndex
public int nextIndex()
- Specified by:
nextIndexin interfaceListIterator<F>
-
previousIndex
public int previousIndex()
- Specified by:
previousIndexin interfaceListIterator<F>
-
remove
public void remove()
-
set
public void set(T o)
- Specified by:
setin interfaceListIterator<F>
-
add
public void add(T o)
- Specified by:
addin interfaceListIterator<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
-
-