E
- the type of the elements in the listjava.lang.Iterable<E>
, java.util.Collection<E>
, java.util.List<E>
AbstractSerializableListDecorator
public 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 | Constructor | 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 | 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.
|
boolean |
equals(java.lang.Object object) |
|
E |
get(int index) |
|
int |
hashCode() |
|
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, isEmpty, iterator, remove, removeAll, retainAll, setCollection, size, toArray, toArray, toString
protected AbstractListDecorator()
protected AbstractListDecorator(java.util.List<E> list)
list
- the list to decorate, must not be nulljava.lang.NullPointerException
- if list is nullprotected java.util.List<E> decorated()
decorated
in class AbstractCollectionDecorator<E>
public boolean equals(java.lang.Object object)
public int hashCode()
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>
Copyright © 2001-2019 - Apache Software Foundation