E
- the type of the elements in the listpublic abstract class AbstractListDecorator<E> extends AbstractCollectionDecorator<E> implements List<E>
List
to provide additional behaviour.
Methods are forwarded directly to the decorated list.
Modifier | Constructor and Description |
---|---|
protected |
AbstractListDecorator()
Constructor only used in deserialization, do not use otherwise.
|
protected |
AbstractListDecorator(List<E> list)
Constructor that wraps (not copies).
|
Modifier and Type | Method and Description |
---|---|
void |
add(int index,
E object) |
boolean |
addAll(int index,
Collection<? extends E> coll) |
protected List<E> |
decorated()
Gets the list being decorated.
|
E |
get(int index) |
int |
indexOf(Object object) |
int |
lastIndexOf(Object object) |
ListIterator<E> |
listIterator() |
ListIterator<E> |
listIterator(int index) |
E |
remove(int index) |
E |
set(int index,
E object) |
List<E> |
subList(int fromIndex,
int toIndex) |
add, addAll, clear, contains, containsAll, equals, hashCode, isEmpty, iterator, remove, removeAll, retainAll, setCollection, size, toArray, toArray, toString
protected AbstractListDecorator()
protected AbstractListDecorator(List<E> list)
list
- the list to decorate, must not be nullIllegalArgumentException
- if list is nullprotected List<E> decorated()
decorated
in class AbstractCollectionDecorator<E>
public boolean addAll(int index, Collection<? extends E> coll)
public int lastIndexOf(Object object)
lastIndexOf
in interface List<E>
public ListIterator<E> listIterator()
listIterator
in interface List<E>
public ListIterator<E> listIterator(int index)
listIterator
in interface List<E>
Copyright © 2001–2013 The Apache Software Foundation. All rights reserved.