Type Parameters:
E - the type of elements in this collection
All Superinterfaces:
Collection<E>, Iterable<E>
All Known Subinterfaces:
BlockingDeque<E>, Deque<E>, List<E>, NavigableSet<E>, SequencedSet<E>, SortedSet<E>
All Known Implementing Classes:
AbstractList, AbstractSequentialList, ArrayDeque, ArrayList, AttributeList, ConcurrentLinkedDeque, ConcurrentSkipListSet, CopyOnWriteArrayList, LinkedBlockingDeque, LinkedHashSet, LinkedList, RoleList, RoleUnresolvedList, Stack, TreeSet, Vector

  • Method Summary

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

    default E

    getFirst()

    Gets the first element of this collection.

    default E

    getLast()

    Gets the last element of this collection.

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

    reversed()

    Returns a reverse-ordered view of this collection.

    Methods declared in interface Collection

    add, addAll, clear, contains, containsAll, equals, hashCode, isEmpty, iterator, parallelStream, remove, removeAll, removeIf, retainAll, size, spliterator, stream, toArray, toArray, toArray

    boolean

    Ensures that this collection contains the specified element (optional operation).

    boolean

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

    void

    Removes all of the elements from 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

    Compares the specified object with this collection for equality.

    int

    Returns the hash code value for this collection.

    boolean

    Returns true if this collection contains no elements.

    Returns an iterator over the elements in this collection.

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

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

    default boolean

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

    boolean

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

    int

    Returns the number of elements in this collection.

    Creates a Spliterator over the elements in this collection.

    Returns a sequential Stream with this collection as its source.

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

    default <T> T[]

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

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

    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.

  • Method Details

    • reversed

    • addFirst

    • addLast

    • getFirst

    • getLast

    • removeFirst

    • removeLast