Top Description Methods
org.reactfx.collection

public Interface UnmodifiableByDefaultList<E>

extends AccessorListMethods<E>
Known Direct Subinterfaces
org.reactfx.collection.UnmodifiableByDefaultLiveList
Imports
java.util.Collection

Trait to be mixed into implementations of unmodifiable lists. Provides default implementations of mutating list methods.

Method Summary

Modifier and TypeMethod and Description
public default void
add(int index, E element)

Implements java.util.List.add.

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

public default boolean
add(E e)

Implements java.util.List.add.

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

public default boolean
addAll(Collection<? extends E> c)

Implements java.util.List.addAll.

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.util.List.addAll.

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

public default void
clear()

Implements java.util.List.clear.

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

public default E
remove(int index)

Implements java.util.List.remove.

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

public default boolean
remove(Object o)

Implements java.util.List.remove.

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.util.List.removeAll.

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.util.List.retainAll.

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.util.List.set.

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

Inherited from org.reactfx.collection.AccessorListMethods:
containscontainsAllindexOfisEmptyiteratorlastIndexOflistIteratorlistIteratorsubListtoArraytoArray

Method Detail

addback to summary
public default void add(int index, E element)

Implements java.util.List.add.

Doc from java.util.List.add.

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

Annotations
@Override
addback to summary
public default boolean add(E e)

Implements java.util.List.add.

Doc from java.util.List.add.

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.

Annotations
@Override
addAllback to summary
public default boolean addAll(Collection<? extends E> c)

Implements java.util.List.addAll.

Doc from java.util.List.addAll.

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

Annotations
@Override
addAllback to summary
public default boolean addAll(int index, Collection<? extends E> c)

Implements java.util.List.addAll.

Doc from java.util.List.addAll.

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

Annotations
@Override
clearback to summary
public default void clear()

Implements java.util.List.clear.

Doc from java.util.List.clear.

Removes all of the elements from this list (optional operation). The list will be empty after this call returns.

Annotations
@Override
removeback to summary
public default E remove(int index)

Implements java.util.List.remove.

Doc from java.util.List.remove.

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.

Annotations
@Override
removeback to summary
public default boolean remove(Object o)

Implements java.util.List.remove.

Doc from java.util.List.remove.

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 i such that Objects.equals(o, get(i)) (if such an element exists). Returns true if this list contained the specified element (or equivalently, if this list changed as a result of the call).

Annotations
@Override
removeAllback to summary
public default boolean removeAll(Collection<?> c)

Implements java.util.List.removeAll.

Doc from java.util.List.removeAll.

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

Annotations
@Override
retainAllback to summary
public default boolean retainAll(Collection<?> c)

Implements java.util.List.retainAll.

Doc from java.util.List.retainAll.

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.

Annotations
@Override
setback to summary
public default E set(int index, E element)

Implements java.util.List.set.

Doc from java.util.List.set.

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

Annotations
@Override