Package com.globalmentor.collections
Class ListDecorator<E>
java.lang.Object
com.globalmentor.collections.CollectionDecorator<E>
com.globalmentor.collections.ListDecorator<E>
- Type Parameters:
E
- The type of element contained in the list.
- All Implemented Interfaces:
Iterable<E>
,Collection<E>
,List<E>
- Direct Known Subclasses:
AbstractConverterList
,DecoratorIDedMappedList
A list that wraps an existing list, providing access through the
List
interface.- Author:
- Garret Wilson
-
Field Summary
Fields inherited from class com.globalmentor.collections.CollectionDecorator
collection
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
boolean
addAll
(int index, Collection<? extends E> c) get
(int index) int
int
listIterator
(int index) remove
(int index) void
replaceAll
(UnaryOperator<E> operator) void
sort
(Comparator<? super E> c) subList
(int fromIndex, int toIndex) Methods inherited from class com.globalmentor.collections.CollectionDecorator
add, addAll, clear, contains, containsAll, equals, hashCode, isEmpty, iterator, parallelStream, remove, removeAll, removeIf, retainAll, size, spliterator, stream, toArray, toArray
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.util.Collection
parallelStream, removeIf, stream
-
Field Details
-
list
The list this class decorates.
-
-
Constructor Details
-
ListDecorator
List constructor.- Parameters:
list
- The list this list should decorate.- Throws:
NullPointerException
- if the provided list isnull
.
-
-
Method Details
-
addAll
-
get
-
set
-
add
-
remove
-
indexOf
-
lastIndexOf
- Specified by:
lastIndexOf
in interfaceList<E>
-
listIterator
- Specified by:
listIterator
in interfaceList<E>
-
listIterator
- Specified by:
listIterator
in interfaceList<E>
-
subList
-
replaceAll
- Specified by:
replaceAll
in interfaceList<E>
-
sort
-