Type Parameters:
E - the type of elements in this list
All Superinterfaces:
Collection<E>, Iterable<E>, SequencedCollection<E>
All Known Implementing Classes:
AbstractList, AbstractSequentialList, ArrayList, AttributeList, CopyOnWriteArrayList, LinkedList, RoleList, RoleUnresolvedList, Stack, Vector

  • 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).

    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

    addFirst(E e)

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

    default void

    addLast(E e)

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

    void

    clear()

    Removes all of the elements from this list (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.

    static <E> List<E>

    Returns an unmodifiable List containing the elements of the given Collection, in its iteration order.

    boolean

    Compares the specified object with this list for equality.

    get(int index)

    Returns the element at the specified position in this list.

    default E

    getFirst()

    Gets the first element of this collection.

    default E

    getLast()

    Gets the last element of this collection.

    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.

    boolean

    isEmpty()

    Returns true if this list contains no elements.

    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.

    static <E> List<E>

    of()

    Returns an unmodifiable list containing zero elements.

    static <E> List<E>

    of(E e1)

    Returns an unmodifiable list containing one element.

    static <E> List<E>

    of(E... elements)

    Returns an unmodifiable list containing an arbitrary number of elements.

    static <E> List<E>

    of(E e1, E e2)

    Returns an unmodifiable list containing two elements.

    static <E> List<E>

    of(E e1, E e2, E e3)

    Returns an unmodifiable list containing three elements.

    static <E> List<E>

    of(E e1, E e2, E e3, E e4)

    Returns an unmodifiable list containing four elements.

    static <E> List<E>

    of(E e1, E e2, E e3, E e4, E e5)

    Returns an unmodifiable list containing five elements.

    static <E> List<E>

    of(E e1, E e2, E e3, E e4, E e5, E e6)

    Returns an unmodifiable list containing six elements.

    static <E> List<E>

    of(E e1, E e2, E e3, E e4, E e5, E e6, E e7)

    Returns an unmodifiable list containing seven elements.

    static <E> List<E>

    of(E e1, E e2, E e3, E e4, E e5, E e6, E e7, E e8)

    Returns an unmodifiable list containing eight elements.

    static <E> List<E>

    of(E e1, E e2, E e3, E e4, E e5, E e6, E e7, E e8, E e9)

    Returns an unmodifiable list containing nine elements.

    static <E> List<E>

    of(E e1, E e2, E e3, E e4, E e5, E e6, E e7, E e8, E e9, E e10)

    Returns an unmodifiable list containing ten elements.

    remove(int index)

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

    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).

    reversed()

    Returns a reverse-ordered view of this collection.

    set(int index, E element)

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

    int

    size()

    Returns the number of elements in this list.

    default void

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

    subList(int fromIndex, int toIndex)

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

    toArray()

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

    <T> T[]

    toArray(T[] a)

    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.

  • Method Details

    • size

    • isEmpty

    • contains

    • iterator

    • toArray

    • toArray

    • add

    • remove

    • containsAll

    • addAll

    • addAll

    • removeAll

    • retainAll

    • replaceAll

    • sort

    • clear

    • equals

    • hashCode

    • get

    • set

    • add

    • remove

    • indexOf

    • lastIndexOf

    • listIterator

    • listIterator

    • subList

    • spliterator

    • addFirst

    • addLast

    • getFirst

    • getLast

    • removeFirst

    • removeLast

    • reversed

    • of

    • of

    • of

    • of

    • of

    • of

    • of

    • of

    • of

    • of

    • of

    • of

    • copyOf