Package io.permazen.util
Class ConvertedList<E,W>
java.lang.Object
java.util.AbstractCollection<E>
java.util.AbstractList<E>
io.permazen.util.ConvertedList<E,W>
- Type Parameters:
E- element type of this listW- element type of the wrapped list
- All Implemented Interfaces:
Iterable<E>,Collection<E>,List<E>
-
Field Summary
Fields inherited from class java.util.AbstractList
modCount -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidbooleanaddAll(int index, Collection<? extends E> elems) voidclear()booleanget(int index) Get theConverterassociated with this instance.Get the wrappedList.intbooleanisEmpty()iterator()intlastIndexOf(Object obj) remove(int index) protected voidremoveRange(int min, int max) intsize()stream()subList(int min, int max) Methods inherited from class java.util.AbstractList
add, equals, hashCode, listIterator, listIteratorMethods inherited from class java.util.AbstractCollection
addAll, containsAll, remove, removeAll, retainAll, 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, toArrayMethods inherited from interface java.util.List
addAll, containsAll, remove, removeAll, replaceAll, retainAll, sort, toArray, toArray
-
Constructor Details
-
ConvertedList
Constructor.- Parameters:
list- wrapped listconverter- element converter- Throws:
IllegalArgumentException- if either parameter is null
-
-
Method Details
-
getWrappedList
Get the wrappedList.- Returns:
- the wrapped
List.
-
getConverter
Get theConverterassociated with this instance.- Returns:
- associated
Converter
-
get
-
size
public int size()- Specified by:
sizein interfaceCollection<E>- Specified by:
sizein interfaceList<E>- Specified by:
sizein classAbstractCollection<E>
-
isEmpty
public boolean isEmpty()- Specified by:
isEmptyin interfaceCollection<E>- Specified by:
isEmptyin interfaceList<E>- Overrides:
isEmptyin classAbstractCollection<E>
-
set
-
add
-
addAll
-
contains
- Specified by:
containsin interfaceCollection<E>- Specified by:
containsin interfaceList<E>- Overrides:
containsin classAbstractCollection<E>
-
indexOf
-
lastIndexOf
- Specified by:
lastIndexOfin interfaceList<E>- Overrides:
lastIndexOfin classAbstractList<E>
-
clear
public void clear()- Specified by:
clearin interfaceCollection<E>- Specified by:
clearin interfaceList<E>- Overrides:
clearin classAbstractList<E>
-
remove
-
iterator
-
spliterator
-
stream
-
subList
-
removeRange
protected void removeRange(int min, int max) - Overrides:
removeRangein classAbstractList<E>
-