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
The <rich:list> component renders a list of items. The list can be an numerically ordered list, an un-ordered bullet-point list, or a data definition list. The component uses a data model for managing the list items, which can be updated dynamically.
|
|
|
|