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 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)
-
Constructor Details
-
ForwardingList
protected ForwardingList()Constructor for use by subclasses.
-
-
Method Details
-
delegate
-
add
-
addAll
-
get
-
indexOf
-
lastIndexOf
-
listIterator
-
listIterator
-
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
-
addAll
-
retainAll
-
clear
public void clear()
-