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
-
Method Summary
Modifier and TypeMethodDescriptionvoid
boolean
addAll
(int index, Collection<? extends E> elems) void
clear()
boolean
get
(int index) Get theConverter
associated with this instance.Get the wrappedList
.int
boolean
isEmpty()
iterator()
int
lastIndexOf
(Object obj) remove
(int index) protected void
removeRange
(int min, int max) int
size()
stream()
subList
(int min, int max) Methods inherited from class java.util.AbstractList
add, equals, hashCode, listIterator, listIterator
Methods inherited from class java.util.AbstractCollection
addAll, containsAll, remove, removeAll, retainAll, 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, toArray
Methods 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 theConverter
associated with this instance.- Returns:
- associated
Converter
-
get
-
size
public int size()- Specified by:
size
in interfaceCollection<E>
- Specified by:
size
in interfaceList<E>
- Specified by:
size
in classAbstractCollection<E>
-
isEmpty
public boolean isEmpty()- Specified by:
isEmpty
in interfaceCollection<E>
- Specified by:
isEmpty
in interfaceList<E>
- Overrides:
isEmpty
in classAbstractCollection<E>
-
set
-
add
-
addAll
-
contains
- Specified by:
contains
in interfaceCollection<E>
- Specified by:
contains
in interfaceList<E>
- Overrides:
contains
in classAbstractCollection<E>
-
indexOf
-
lastIndexOf
- Specified by:
lastIndexOf
in interfaceList<E>
- Overrides:
lastIndexOf
in classAbstractList<E>
-
clear
public void clear()- Specified by:
clear
in interfaceCollection<E>
- Specified by:
clear
in interfaceList<E>
- Overrides:
clear
in classAbstractList<E>
-
remove
-
iterator
-
spliterator
-
stream
-
subList
-
removeRange
protected void removeRange(int min, int max) - Overrides:
removeRange
in classAbstractList<E>
-