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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidbooleanbooleanaddAll(int index, Collection<? extends E> elements) booleanaddAll(Collection<? extends E> collection) voidclear()booleanbooleancontainsAll(Collection<?> collection) delegate()booleanget(int index) inthashCode()intbooleanisEmpty()iterator()intlastIndexOf(Object element) listIterator(int index) remove(int index) booleanbooleanremoveAll(Collection<?> collection) booleanretainAll(Collection<?> collection) intsize()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, waitMethods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArrayMethods 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:
lastIndexOfin interfaceList<E>
-
listIterator
- Specified by:
listIteratorin interfaceList<E>
-
listIterator
- Specified by:
listIteratorin 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:
containsAllin interfaceCollection<E>- Specified by:
containsAllin interfaceList<E>
-
addAll
-
retainAll
-
clear
public void clear()
-