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:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class com.tangosol.util.ConverterCollections.ConverterCollection
m_col, m_convDown, m_convUp
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd(int index, T element)booleanaddAll(int index, Collection<? extends T> col)booleanequals(Object o)Compares the specified object with this collection for equality.Tget(int index)List<F>getList()Return the underlying List.inthashCode()intindexOf(Object o)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.intlastIndexOf(Object o)ListIterator<T>listIterator()ListIterator<T>listIterator(int index)Tremove(int index)Tset(int index, T element)List<T>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
-
-
-
-
Method Detail
-
addAll
public boolean addAll(int index, Collection<? extends T> col)
-
lastIndexOf
public int lastIndexOf(Object o)
- Specified by:
lastIndexOfin interfaceList<F>
-
listIterator
public ListIterator<T> listIterator()
- Specified by:
listIteratorin interfaceList<F>
-
listIterator
public ListIterator<T> listIterator(int index)
- Specified by:
listIteratorin interfaceList<F>
-
equals
public boolean equals(Object o)
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
-
-