Top Fields Constructors Methods
org.reactfx.collection

public final Class LiveArrayList<E>

extends LiveListBase<E>
Class Inheritance
Imports
java.util.ArrayList, .Arrays, .Collection, .Collections, .List, org.reactfx.Subscription

Field Summary

Modifier and TypeField and Description
private List<E>

Constructor Summary

AccessConstructor and Description
public
public
LiveArrayList(Collection<? extends E> c)

public
LiveArrayList(E... initialElements)

Method Summary

Modifier and TypeMethod and Description
public 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 boolean
add(E e)

Implements java.util.List.add.

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

public 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 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 final boolean
addAll(E... elems)

Implements javafx.collections.ObservableList.addAll.

A convenience method for var-arg addition of elements.

public void
clear()

Implements java.util.List.clear.

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

public E
get(int index)

Implements java.util.List.get.

Returns the element at the specified position in this list.

protected Subscription
observeInputs()

Implements abstract org.reactfx.ObservableBase.observeInputs.

Starts observing this observable's input(s), if any.

public E
remove(int index)

Implements java.util.List.remove.

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

public void
remove(int from, int to)

Implements javafx.collections.ObservableList.remove.

A simplified way of calling sublist(from, to).clear().

public 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 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 final boolean
removeAll(E... elems)

Implements javafx.collections.ObservableList.removeAll.

A convenience method for var-arg usage of the removeAll method.

public 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 final boolean
retainAll(E... elems)

Implements javafx.collections.ObservableList.retainAll.

A convenience method for var-arg usage of the retainAll method.

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

public boolean
setAll(Collection<? extends E> c)

Implements javafx.collections.ObservableList.setAll.

Clears the ObservableList and adds all elements from the collection.

public final boolean
setAll(E... elems)

Implements javafx.collections.ObservableList.setAll.

Clears the ObservableList and adds all the elements passed as var-args.

public int
size()

Implements java.util.List.size.

Returns the number of elements in this list.

Field Detail

listback to summary
private List<E> list

Constructor Detail

LiveArrayListback to summary
public LiveArrayList()
LiveArrayListback to summary
public LiveArrayList(Collection<? extends E> c)
LiveArrayListback to summary
public LiveArrayList(E... initialElements)
Annotations
@SafeVarargs

Method Detail

addback to summary
public 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 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 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
addAllback to summary
public 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 final boolean addAll(E... elems)

Implements javafx.collections.ObservableList.addAll.

Doc from javafx.collections.ObservableList.addAll.

A convenience method for var-arg addition of elements.

Annotations
@SafeVarargs
@Override
clearback to summary
public 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
getback to summary
public E get(int index)

Implements java.util.List.get.

Doc from java.util.List.get.

Returns the element at the specified position in this list.

Annotations
@Override
observeInputsback to summary
protected Subscription observeInputs()

Implements abstract org.reactfx.ObservableBase.observeInputs.

Doc from org.reactfx.ObservableBase.observeInputs.

Starts observing this observable's input(s), if any. This method is called when the number of observers goes from 0 to 1. This method is called before newObserver(Object) is called for the first observer.

Annotations
@Override
removeback to summary
public 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 void remove(int from, int to)

Implements javafx.collections.ObservableList.remove.

Doc from javafx.collections.ObservableList.remove.

A simplified way of calling sublist(from, to).clear(). As this is a common operation, ObservableList has this method for convenient usage.

Annotations
@Override
removeback to summary
public 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 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
removeAllback to summary
public final boolean removeAll(E... elems)

Implements javafx.collections.ObservableList.removeAll.

Doc from javafx.collections.ObservableList.removeAll.

A convenience method for var-arg usage of the removeAll method.

Annotations
@SafeVarargs
@Override
retainAllback to summary
public 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
retainAllback to summary
public final boolean retainAll(E... elems)

Implements javafx.collections.ObservableList.retainAll.

Doc from javafx.collections.ObservableList.retainAll.

A convenience method for var-arg usage of the retainAll method.

Annotations
@SafeVarargs
@Override
setback to summary
public 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
setAllback to summary
public boolean setAll(Collection<? extends E> c)

Implements javafx.collections.ObservableList.setAll.

Doc from javafx.collections.ObservableList.setAll.

Clears the ObservableList and adds all elements from the collection.

Annotations
@Override
setAllback to summary
public final boolean setAll(E... elems)

Implements javafx.collections.ObservableList.setAll.

Doc from javafx.collections.ObservableList.setAll.

Clears the ObservableList and adds all the elements passed as var-args.

Annotations
@SafeVarargs
@Override
sizeback to summary
public int size()

Implements java.util.List.size.

Doc from java.util.List.size.

Returns the number of elements in this list. If this list contains more than Integer.MAX_VALUE elements, returns Integer.MAX_VALUE.

Annotations
@Override