Package com.tangosol.util
Class ConverterCollections.ConverterList<F,T>
java.lang.Object
com.tangosol.util.ConverterCollections.ConverterCollection<F,T>
com.tangosol.util.ConverterCollections.ConverterList<F,T>
- Type Parameters:
F
- the type of elements in the underlying ListT
- the type that the elements should be converted to
- All Implemented Interfaces:
Serializable
,Iterable<T>
,Collection<T>
,List<T>
,SequencedCollection<T>
- Enclosing class:
ConverterCollections
public static class ConverterCollections.ConverterList<F,T>
extends ConverterCollections.ConverterCollection<F,T>
implements List<T>, Serializable
A Converter List views an underlying List through a Converter.
- See Also:
-
Field Summary
Fields inherited from class com.tangosol.util.ConverterCollections.ConverterCollection
m_col, m_convDown, m_convUp
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
boolean
addAll
(int index, Collection<? extends T> col) boolean
Compares the specified object with this collection for equality.get
(int index) getList()
Return the underlying List.int
hashCode()
int
protected <F,
T> List <T> instantiateList
(List<F> list, Converter<F, T> convUp, Converter<T, F> convDown) Create a Converter List.protected <F,
T> ListIterator <T> instantiateListIterator
(ListIterator<F> iter, Converter<F, T> convUp, Converter<T, F> convDown) Create a Converter ListIterator.int
listIterator
(int index) remove
(int index) subList
(int fromIndex, int toIndex) Methods inherited from class com.tangosol.util.ConverterCollections.ConverterCollection
add, addAll, clear, contains, containsAll, getCollection, getConverterDown, getConverterUp, instantiateCollection, instantiateIterator, invalidate, isEmpty, iterator, remove, removeAll, retainAll, size, toArray, toArray, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArray
Methods inherited from interface java.util.List
add, addAll, addFirst, addLast, clear, contains, containsAll, getFirst, getLast, isEmpty, iterator, remove, removeAll, removeFirst, removeLast, replaceAll, retainAll, reversed, size, sort, spliterator, toArray, toArray
-
Constructor Details
-
ConverterList
Constructor.- Parameters:
list
- the underlying ListconvUp
- the Converter from the underlying ListconvDown
- the Converter to the underlying List
-
-
Method Details
-
get
-
set
-
add
-
addAll
-
remove
-
indexOf
-
lastIndexOf
- Specified by:
lastIndexOf
in interfaceList<F>
-
listIterator
- Specified by:
listIterator
in interfaceList<F>
-
listIterator
- Specified by:
listIterator
in interfaceList<F>
-
subList
-
equals
Compares the specified object with this collection for equality.Obeys the general contract of Collection.equals.
- Specified by:
equals
in interfaceCollection<F>
- Specified by:
equals
in interfaceList<F>
- Overrides:
equals
in classConverterCollections.ConverterCollection<F,
T> - Parameters:
o
- Object to be compared for equality with this Collection- Returns:
- true if the specified object is equal to this Collection
-
hashCode
public int hashCode() -
instantiateList
protected <F,T> List<T> instantiateList(List<F> list, Converter<F, T> convUp, Converter<T, F> convDown) Create a Converter List.- Type Parameters:
F
- the type of elements in the underlying ListT
- the type that the elements should be converted to- Parameters:
list
- the underlying ListconvUp
- the Converter to view the underlying List throughconvDown
- the Converter to pass items down to the underlying List through- Returns:
- a Converter List
-
instantiateListIterator
protected <F,T> ListIterator<T> instantiateListIterator(ListIterator<F> iter, Converter<F, T> convUp, Converter<T, F> convDown) Create a Converter ListIterator.- Type Parameters:
F
- the type of elements in the underlying ListIteratorT
- the type that the elements should be converted to- Parameters:
iter
- the underlying ListIteratorconvUp
- the Converter to view the underlying ListIterator throughconvDown
- the Converter to pass items down to the underlying ListIterator through- Returns:
- a Converter ListIterator
-
getList
Return the underlying List.- Returns:
- the underlying List
-