Package org.infinispan.commons.util
Class ForwardingList<E>
java.lang.Object
org.infinispan.commons.util.ForwardingList<E>
- All Implemented Interfaces:
Iterable<E>
,Collection<E>
,List<E>
- Direct Known Subclasses:
EnumerationList
A list which forwards all its method calls to another list. Subclasses should override one or more methods to modify the
behavior of the backing list as desired per the decorator
pattern.
This class does not implement RandomAccess
. If the delegate supports random access, the
ForwardingList
subclass should implement the RandomAccess
interface.
- Since:
- 2 (imported from Google Collections Library)
- Author:
- Mike Bostock
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
boolean
boolean
addAll
(int index, Collection<? extends E> elements) boolean
addAll
(Collection<? extends E> collection) void
clear()
boolean
boolean
containsAll
(Collection<?> collection) delegate()
boolean
get
(int index) int
hashCode()
int
boolean
isEmpty()
iterator()
int
lastIndexOf
(Object element) listIterator
(int index) remove
(int index) boolean
boolean
removeAll
(Collection<?> collection) boolean
retainAll
(Collection<?> collection) int
size()
subList
(int fromIndex, int toIndex) Object[]
toArray()
<T> T[]
toArray
(T[] array) 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, toArray
Methods inherited from interface java.util.List
replaceAll, sort, spliterator
-
Constructor Details
-
ForwardingList
protected ForwardingList()Constructor for use by subclasses.
-
-
Method Details
-
delegate
-
add
-
addAll
-
get
-
indexOf
-
lastIndexOf
- Specified by:
lastIndexOf
in interfaceList<E>
-
listIterator
- Specified by:
listIterator
in interfaceList<E>
-
listIterator
- Specified by:
listIterator
in interfaceList<E>
-
remove
-
set
-
subList
-
equals
-
hashCode
public int hashCode() -
iterator
-
size
public int size() -
removeAll
-
isEmpty
public boolean isEmpty() -
contains
-
toArray
-
toArray
public <T> T[] toArray(T[] array) -
add
-
remove
-
containsAll
- Specified by:
containsAll
in interfaceCollection<E>
- Specified by:
containsAll
in interfaceList<E>
-
addAll
-
retainAll
-
clear
public void clear()
-