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>
- 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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidbooleanaddAll(int index, Collection<? extends T> col) booleanCompares the specified object with this collection for equality.get(int index) getList()Return the underlying List.inthashCode()intprotected <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.intlistIterator(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, toStringMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Collection
parallelStream, removeIf, stream, 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:
lastIndexOfin interfaceList<F>
-
listIterator
- Specified by:
listIteratorin interfaceList<F>
-
listIterator
- Specified by:
listIteratorin interfaceList<F>
-
subList
-
equals
Compares the specified object with this collection for equality.Obeys the general contract of Collection.equals.
- Specified by:
equalsin interfaceCollection<F>- Specified by:
equalsin interfaceList<F>- Overrides:
equalsin 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
-