E - the type of the elements in the listpublic abstract class AbstractListDecorator<E> extends AbstractCollectionDecorator<E> implements java.util.List<E>
List to provide additional behaviour.
Methods are forwarded directly to the decorated list.
| Modifier and Type | Field and Description |
|---|---|
private static long |
serialVersionUID
Serialization version--necessary in an abstract class?
|
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractListDecorator()
Constructor only used in deserialization, do not use otherwise.
|
protected |
AbstractListDecorator(java.util.List<E> list)
Constructor that wraps (not copies).
|
| Modifier and Type | Method and Description |
|---|---|
void |
add(int index,
E object) |
boolean |
addAll(int index,
java.util.Collection<? extends E> coll) |
protected java.util.List<E> |
decorated()
Gets the list being decorated.
|
E |
get(int index) |
int |
indexOf(java.lang.Object object) |
int |
lastIndexOf(java.lang.Object object) |
java.util.ListIterator<E> |
listIterator() |
java.util.ListIterator<E> |
listIterator(int index) |
E |
remove(int index) |
E |
set(int index,
E object) |
java.util.List<E> |
subList(int fromIndex,
int toIndex) |
add, addAll, clear, contains, containsAll, equals, hashCode, isEmpty, iterator, remove, removeAll, retainAll, setCollection, size, toArray, toArray, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitprivate static final long serialVersionUID
protected AbstractListDecorator()
protected AbstractListDecorator(java.util.List<E> list)
list - the list to decorate, must not be nulljava.lang.IllegalArgumentException - if list is nullprotected java.util.List<E> decorated()
decorated in class AbstractCollectionDecorator<E>public boolean addAll(int index,
java.util.Collection<? extends E> coll)
addAll in interface java.util.List<E>public int indexOf(java.lang.Object object)
indexOf in interface java.util.List<E>public int lastIndexOf(java.lang.Object object)
lastIndexOf in interface java.util.List<E>public java.util.ListIterator<E> listIterator()
listIterator in interface java.util.List<E>public java.util.ListIterator<E> listIterator(int index)
listIterator in interface java.util.List<E>