| Modifier and Type | Method and Description |
|---|---|
| public default void | add(int index, E element)
Implements java. Inserts the specified element at the specified position in this list (optional operation). |
| public default boolean | add(E e)
Implements java. Appends the specified element to the end of this list (optional operation). |
| public default boolean | addAll(Collection<? extends E> c)
Implements java. 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). |
| public default boolean | addAll(int index, Collection<? extends E> c)
Implements java. Inserts all of the elements in the specified collection into this list at the specified position (optional operation). |
| public default void | clear()
Implements java. Removes all of the elements from this list (optional operation). |
| public default E | remove(int index)
Implements java. Removes the element at the specified position in this list (optional operation). |
| public default boolean | remove(Object o)
Implements java. Removes the first occurrence of the specified element from this list, if it is present (optional operation). |
| public default boolean | removeAll(Collection<?> c)
Implements java. Removes from this list all of its elements that are contained in the specified collection (optional operation). |
| public default boolean | retainAll(Collection<?> c)
Implements java. Retains only the elements in this list that are contained in the specified collection (optional operation). |
| public default E | set(int index, E element)
Implements java. Replaces the element at the specified position in this list with the specified element (optional operation). |
| add | back to summary |
|---|---|
| public default void add(int index, E element) Implements java. Doc from java. Inserts the specified element at the specified position in this list (optional operation). Shifts the element currently at that position (if any) and any subsequent elements to the right (adds one to their indices).
| |
| add | back to summary |
|---|---|
| public default boolean add(E e) Implements java. Doc from java. Appends the specified element to the end of this list (optional operation). Lists that support this operation may place limitations on what elements may be added to this list. In particular, some lists will refuse to add null elements, and others will impose restrictions on the type of elements that may be added. List classes should clearly specify in their documentation any restrictions on what elements may be added.
| |
| addAll | back to summary |
|---|---|
| public default boolean addAll(Collection<? extends E> c) Implements java. Doc from java. 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). The behavior of this operation is undefined if the specified collection is modified while the operation is in progress. (Note that this will occur if the specified collection is this list, and it's nonempty.)
| |
| addAll | back to summary |
|---|---|
| public default boolean addAll(int index, Collection<? extends E> c) Implements java. Doc from java. Inserts all of the elements in the specified collection into this list at the specified position (optional operation). Shifts the element currently at that position (if any) and any subsequent elements to the right (increases their indices). The new elements will appear in this list in the order that they are returned by the specified collection's iterator. The behavior of this operation is undefined if the specified collection is modified while the operation is in progress. (Note that this will occur if the specified collection is this list, and it's nonempty.)
| |
| clear | back to summary |
|---|---|
| public default void clear() Implements java. Doc from java. Removes all of the elements from this list (optional operation). The list will be empty after this call returns.
| |
| remove | back to summary |
|---|---|
| public default E remove(int index) Implements java. Doc from java. Removes the element at the specified position in this list (optional operation). Shifts any subsequent elements to the left (subtracts one from their indices). Returns the element that was removed from the list.
| |
| remove | back to summary |
|---|---|
| public default boolean remove(Object o) Implements java. Doc from java. Removes the first occurrence of the specified element from this list,
if it is present (optional operation). If this list does not contain
the element, it is unchanged. More formally, removes the element with
the lowest index
| |
| removeAll | back to summary |
|---|---|
| public default boolean removeAll(Collection<?> c) Implements java. Doc from java. Removes from this list all of its elements that are contained in the specified collection (optional operation).
| |
| retainAll | back to summary |
|---|---|
| public default boolean retainAll(Collection<?> c) Implements java. Doc from java. Retains only the elements in this list that are contained in the specified collection (optional operation). In other words, removes from this list all of its elements that are not contained in the specified collection.
| |
| set | back to summary |
|---|---|
| public default E set(int index, E element) Implements java. Doc from java. Replaces the element at the specified position in this list with the specified element (optional operation).
| |