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_convDown
The Converter from this ListIterator to the underlying ListIterator.protected Converter<F,T>
m_convUp
The Converter from the underlying ListIterator to this ListIterator.protected ListIterator<F>
m_iter
The 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 void
add(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.boolean
hasNext()
boolean
hasPrevious()
T
next()
int
nextIndex()
T
previous()
int
previousIndex()
void
remove()
void
set(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:
hasPrevious
in interfaceListIterator<F>
-
previous
public T previous()
- Specified by:
previous
in interfaceListIterator<F>
-
nextIndex
public int nextIndex()
- Specified by:
nextIndex
in interfaceListIterator<F>
-
previousIndex
public int previousIndex()
- Specified by:
previousIndex
in interfaceListIterator<F>
-
remove
public void remove()
-
set
public void set(T o)
- Specified by:
set
in interfaceListIterator<F>
-
add
public void add(T o)
- Specified by:
add
in 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
-
-