Type Parameters:
E - the type of elements in this list
All Implemented Interfaces:
Iterable<E>, Collection<E>, List<E>, SequencedCollection<E>
Direct Known Subclasses:
AbstractSequentialList, ArrayList, Vector

  • Field Summary

    Fields

    protected int

    The number of times this list has been structurally modified.

  • Constructor Summary

    Constructors

  • Method Summary

    void

    add(int index, E element)

    Inserts the specified element at the specified position in this list (optional operation).

    boolean

    add(E e)

    Appends the specified element to the end of this list (optional operation).

    boolean

    Inserts all of the elements in the specified collection into this list at the specified position (optional operation).

    void

    clear()

    Removes all of the elements from this list (optional operation).

    boolean

    Compares the specified object with this list for equality.

    abstract E

    get(int index)

    Returns the element at the specified position in this list.

    int

    hashCode()

    Returns the hash code value for this list.

    int

    Returns the index of the first occurrence of the specified element in this list, or -1 if this list does not contain the element.

    iterator()

    Returns an iterator over the elements in this list in proper sequence.

    int

    Returns the index of the last occurrence of the specified element in this list, or -1 if this list does not contain the element.

    Returns a list iterator over the elements in this list (in proper sequence).

    listIterator(int index)

    Returns a list iterator over the elements in this list (in proper sequence), starting at the specified position in the list.

    remove(int index)

    Removes the element at the specified position in this list (optional operation).

    protected void

    removeRange(int fromIndex, int toIndex)

    Removes from this list all of the elements whose index is between fromIndex, inclusive, and toIndex, exclusive.

    set(int index, E element)

    Replaces the element at the specified position in this list with the specified element (optional operation).

    subList(int fromIndex, int toIndex)

    Returns a view of the portion of this list between the specified fromIndex, inclusive, and toIndex, exclusive.

    Methods declared in class AbstractCollection

    addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray, toString

    boolean

    Adds all of the elements in the specified collection to this collection (optional operation).

    boolean

    Returns true if this collection contains the specified element.

    boolean

    Returns true if this collection contains all of the elements in the specified collection.

    boolean

    Returns true if this collection contains no elements.

    boolean

    Removes a single instance of the specified element from this collection, if it is present (optional operation).

    boolean

    Removes all of this collection's elements that are also contained in the specified collection (optional operation).

    boolean

    Retains only the elements in this collection that are contained in the specified collection (optional operation).

    Returns an array containing all of the elements in this collection.

    <T> T[]

    Returns an array containing all of the elements in this collection; the runtime type of the returned array is that of the specified array.

    Returns a string representation of this collection.

    Methods declared in class Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait

    Creates and returns a copy of this object.

    protected void

    Deprecated, for removal: This API element is subject to removal in a future version.

    Returns the runtime class of this Object.

    final void

    Wakes up a single thread that is waiting on this object's monitor.

    final void

    Wakes up all threads that are waiting on this object's monitor.

    final void

    Causes the current thread to wait until it is awakened, typically by being notified or interrupted.

    final void

    wait(long timeoutMillis)

    Causes the current thread to wait until it is awakened, typically by being notified or interrupted, or until a certain amount of real time has elapsed.

    final void

    wait(long timeoutMillis, int nanos)

    Causes the current thread to wait until it is awakened, typically by being notified or interrupted, or until a certain amount of real time has elapsed.

    Methods declared in interface Collection

    parallelStream, removeIf, stream, toArray

    Returns a possibly parallel Stream with this collection as its source.

    default boolean

    Removes all of the elements of this collection that satisfy the given predicate (optional operation).

    Returns a sequential Stream with this collection as its source.

    default <T> T[]

    Returns an array containing all of the elements in this collection, using the provided generator function to allocate the returned array.

    Methods declared in interface Iterable

    forEach

    default void

    Performs the given action for each element of the Iterable until all elements have been processed or the action throws an exception.

    Methods declared in interface List

    addAll, addFirst, addLast, contains, containsAll, getFirst, getLast, isEmpty, remove, removeAll, removeFirst, removeLast, replaceAll, retainAll, reversed, size, sort, spliterator, toArray, toArray

    boolean

    Appends all of the elements in the specified collection to the end of this list, in the order that they are returned by the specified collection's iterator (optional operation).

    default void

    Adds an element as the first element of this collection (optional operation).

    default void

    Adds an element as the last element of this collection (optional operation).

    boolean

    Returns true if this list contains the specified element.

    boolean

    Returns true if this list contains all of the elements of the specified collection.

    default E

    Gets the first element of this collection.

    default E

    Gets the last element of this collection.

    boolean

    Returns true if this list contains no elements.

    boolean

    Removes the first occurrence of the specified element from this list, if it is present (optional operation).

    boolean

    Removes from this list all of its elements that are contained in the specified collection (optional operation).

    default E

    Removes and returns the first element of this collection (optional operation).

    default E

    Removes and returns the last element of this collection (optional operation).

    default void

    Replaces each element of this list with the result of applying the operator to that element (optional operation).

    boolean

    Retains only the elements in this list that are contained in the specified collection (optional operation).

    Returns a reverse-ordered view of this collection.

    int

    Returns the number of elements in this list.

    default void

    Sorts this list according to the order induced by the specified Comparator (optional operation).

    Returns an array containing all of the elements in this list in proper sequence (from first to last element).

    <T> T[]

    Returns an array containing all of the elements in this list in proper sequence (from first to last element); the runtime type of the returned array is that of the specified array.

  • Field Details

    • modCount

  • Constructor Details

    • AbstractList

  • Method Details

    • add

    • get

    • set

    • add

    • remove

    • indexOf

    • lastIndexOf

    • clear

    • addAll

    • iterator

    • listIterator

    • listIterator

    • subList

    • equals

    • hashCode

    • removeRange