< prev index next >

src/java.base/share/classes/java/util/AbstractList.java

Print this page




  45  * {@link #add(int, Object) add(int, E)} and {@link #remove(int)} methods.
  46  *
  47  * <p>The programmer should generally provide a void (no argument) and collection
  48  * constructor, as per the recommendation in the {@link Collection} interface
  49  * specification.
  50  *
  51  * <p>Unlike the other abstract collection implementations, the programmer does
  52  * <i>not</i> have to provide an iterator implementation; the iterator and
  53  * list iterator are implemented by this class, on top of the "random access"
  54  * methods:
  55  * {@link #get(int)},
  56  * {@link #set(int, Object) set(int, E)},
  57  * {@link #add(int, Object) add(int, E)} and
  58  * {@link #remove(int)}.
  59  *
  60  * <p>The documentation for each non-abstract method in this class describes its
  61  * implementation in detail.  Each of these methods may be overridden if the
  62  * collection being implemented admits a more efficient implementation.
  63  *
  64  * <p>This class is a member of the
  65  * <a href="{@docRoot}/java/util/package-summary.html#CollectionsFramework">
  66  * Java Collections Framework</a>.
  67  *
  68  * @author  Josh Bloch
  69  * @author  Neal Gafter
  70  * @since 1.2
  71  */
  72 
  73 public abstract class AbstractList<E> extends AbstractCollection<E> implements List<E> {
  74     /**
  75      * Sole constructor.  (For invocation by subclass constructors, typically
  76      * implicit.)
  77      */
  78     protected AbstractList() {
  79     }
  80 
  81     /**
  82      * Appends the specified element to the end of this list (optional
  83      * operation).
  84      *
  85      * <p>Lists that support this operation may place limitations on what




  45  * {@link #add(int, Object) add(int, E)} and {@link #remove(int)} methods.
  46  *
  47  * <p>The programmer should generally provide a void (no argument) and collection
  48  * constructor, as per the recommendation in the {@link Collection} interface
  49  * specification.
  50  *
  51  * <p>Unlike the other abstract collection implementations, the programmer does
  52  * <i>not</i> have to provide an iterator implementation; the iterator and
  53  * list iterator are implemented by this class, on top of the "random access"
  54  * methods:
  55  * {@link #get(int)},
  56  * {@link #set(int, Object) set(int, E)},
  57  * {@link #add(int, Object) add(int, E)} and
  58  * {@link #remove(int)}.
  59  *
  60  * <p>The documentation for each non-abstract method in this class describes its
  61  * implementation in detail.  Each of these methods may be overridden if the
  62  * collection being implemented admits a more efficient implementation.
  63  *
  64  * <p>This class is a member of the
  65  * <a href="{@docRoot}/java.base/java/util/package-summary.html#CollectionsFramework">
  66  * Java Collections Framework</a>.
  67  *
  68  * @author  Josh Bloch
  69  * @author  Neal Gafter
  70  * @since 1.2
  71  */
  72 
  73 public abstract class AbstractList<E> extends AbstractCollection<E> implements List<E> {
  74     /**
  75      * Sole constructor.  (For invocation by subclass constructors, typically
  76      * implicit.)
  77      */
  78     protected AbstractList() {
  79     }
  80 
  81     /**
  82      * Appends the specified element to the end of this list (optional
  83      * operation).
  84      *
  85      * <p>Lists that support this operation may place limitations on what


< prev index next >