@GwtCompatible public abstract class ForwardingList<E> extends ForwardingCollection<E> implements List<E>
This class does not implement RandomAccess. If the
delegate supports random access, the ForwardingList subclass should
implement the RandomAccess interface.
Warning: The methods of ForwardingList forward
indiscriminately to the methods of the delegate. For example,
overriding add(int, E) alone will not change the behavior of addAll(int, java.util.Collection<? extends E>), which can lead to unexpected behavior. In this case, you should
override addAll as well, either providing your own implementation, or
delegating to the provided standardAddAll method.
The standard methods and any collection views they return are not
guaranteed to be thread-safe, even when all of the methods that they depend
on are thread-safe.
| Modifier and Type | Method and Description |
|---|---|
void |
add(int index,
E element) |
boolean |
addAll(int index,
Collection<? extends E> elements) |
boolean |
equals(Object object) |
E |
get(int index) |
int |
hashCode() |
int |
indexOf(Object element) |
int |
lastIndexOf(Object element) |
ListIterator<E> |
listIterator() |
ListIterator<E> |
listIterator(int index) |
E |
remove(int index) |
E |
set(int index,
E element) |
List<E> |
subList(int fromIndex,
int toIndex) |
add, addAll, clear, contains, containsAll, isEmpty, iterator, remove, removeAll, retainAll, size, toArray, toArraytoStringadd, addAll, clear, contains, containsAll, isEmpty, iterator, remove, removeAll, replaceAll, retainAll, size, sort, spliterator, toArray, toArrayparallelStream, removeIf, streampublic boolean addAll(int index,
Collection<? extends E> elements)
public int lastIndexOf(Object element)
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 © 2010 - 2020 Adobe. All Rights Reserved