This class provides a skeletal implementation of the {@link List}interface to minimize the effort required to implement this interface backed by a "random access" data store (such as an array). For sequential access data (such as a linked list), {@link AbstractSequentialList} shouldbe used in preference to this class.
To implement an unmodifiable list, the programmer needs only to extend this class and provide implementations for the {@link #get(int)} and{@link List#size() size()} methods.
To implement a modifiable list, the programmer must additionally override the {@link #set(int,Object) set(int, E)} method (which otherwisethrows an {@code UnsupportedOperationException}). If the list is variable-size the programmer must additionally override the {@link #add(int,Object) add(int, E)} and {@link #remove(int)} methods.
The programmer should generally provide a void (no argument) and collection constructor, as per the recommendation in the {@link Collection} interfacespecification.
Unlike the other abstract collection implementations, the programmer does not have to provide an iterator implementation; the iterator and list iterator are implemented by this class, on top of the "random access" methods: {@link #get(int)}, {@link #set(int,Object) set(int, E)}, {@link #add(int,Object) add(int, E)} and{@link #remove(int)}.
The documentation for each non-abstract method in this class describes its implementation in detail. Each of these methods may be overridden if the collection being implemented admits a more efficient implementation.
This class is a member of the Java Collections Framework.
@author Josh Bloch
@author Neal Gafter
@version 1.52, 06/16/06
@since 1.2