Package org.reactfx.collection
Class LiveArrayList<E>
- java.lang.Object
-
- org.reactfx.ObservableBase<LiveList.Observer<? super E,?>,QuasiListChange<? extends E>>
-
- org.reactfx.collection.LiveListBase<E>
-
- org.reactfx.collection.LiveArrayList<E>
-
- All Implemented Interfaces:
java.lang.Iterable<E>,java.util.Collection<E>,java.util.List<E>,javafx.beans.Observable,javafx.collections.ObservableList<E>,AccessorListMethods<E>,LiveList<E>,ProperLiveList<E>,Observable<LiveList.Observer<? super E,?>>,ProperObservable<LiveList.Observer<? super E,?>,QuasiListChange<? extends E>>
public final class LiveArrayList<E> extends LiveListBase<E>
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.reactfx.collection.LiveList
LiveList.Observer<E,O>, LiveList.QuasiChangeObserver<E>, LiveList.QuasiModificationObserver<E>
-
-
Constructor Summary
Constructors Constructor Description LiveArrayList()LiveArrayList(E... initialElements)LiveArrayList(java.util.Collection<? extends E> c)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd(int index, E element)booleanadd(E e)booleanaddAll(int index, java.util.Collection<? extends E> c)booleanaddAll(E... elems)booleanaddAll(java.util.Collection<? extends E> c)voidclear()Eget(int index)protected SubscriptionobserveInputs()Starts observing this observable's input(s), if any.Eremove(int index)voidremove(int from, int to)booleanremove(java.lang.Object o)booleanremoveAll(E... elems)booleanremoveAll(java.util.Collection<?> c)booleanretainAll(E... elems)booleanretainAll(java.util.Collection<?> c)Eset(int index, E element)booleansetAll(E... elems)booleansetAll(java.util.Collection<? extends E> c)intsize()-
Methods inherited from class org.reactfx.ObservableBase
addObserver, enqueueNotifications, equals, forEachObserver, getObserverCount, hashCode, isObservingInputs, newObserver, notifyObservers, notifyObservers, observe, removeObserver, toString
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.reactfx.collection.AccessorListMethods
contains, containsAll, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, subList, toArray, toArray
-
Methods inherited from interface org.reactfx.collection.LiveList
addChangeObserver, addListener, addListener, addModificationObserver, addQuasiChangeObserver, addQuasiModificationObserver, changes, collapse, collapseDynamic, map, mapDynamic, memoize, modifications, observeChanges, observeModifications, observeQuasiChanges, observeQuasiModifications, pin, quasiChanges, quasiModifications, reduce, reduceRange, removeChangeObserver, removeListener, removeListener, removeModificationObserver, removeQuasiChangeObserver, removeQuasiModificationObserver, sizeProperty, suspendable
-
Methods inherited from interface org.reactfx.Observable
addObserver, observe, removeObserver
-
Methods inherited from interface org.reactfx.collection.ProperLiveList
contentReplacement, defaultEquals, defaultHashCode, defaultNotificationAccumulator, defaultToString, fireContentReplacement, fireElemInsertion, fireElemRemoval, fireElemReplacement, fireModification, fireRangeInsertion, fireRemoveRange
-
Methods inherited from interface org.reactfx.ProperObservable
notifyObservers
-
-
-
-
Field Detail
-
list
private java.util.List<E> list
-
-
Method Detail
-
size
public int size()
-
get
public E get(int index)
-
setAll
public boolean setAll(java.util.Collection<? extends E> c)
-
setAll
@SafeVarargs public final boolean setAll(E... elems)
-
add
public void add(int index, E element)
-
add
public boolean add(E e)
-
addAll
public boolean addAll(int index, java.util.Collection<? extends E> c)
-
addAll
public boolean addAll(java.util.Collection<? extends E> c)
-
addAll
@SafeVarargs public final boolean addAll(E... elems)
-
remove
public E remove(int index)
-
remove
public void remove(int from, int to)
-
remove
public boolean remove(java.lang.Object o)
-
removeAll
public boolean removeAll(java.util.Collection<?> c)
-
removeAll
@SafeVarargs public final boolean removeAll(E... elems)
-
retainAll
public boolean retainAll(java.util.Collection<?> c)
-
retainAll
@SafeVarargs public final boolean retainAll(E... elems)
-
clear
public void clear()
-
observeInputs
protected Subscription observeInputs()
Description copied from class:ObservableBaseStarts 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 beforeObservableBase.newObserver(Object)is called for the first observer.- Specified by:
observeInputsin classObservableBase<LiveList.Observer<? super E,?>,QuasiListChange<? extends E>>- Returns:
- subscription used to stop observing inputs. The subscription is unsubscribed (i.e. input observation stops) when the number of observers goes down to 0.
-
-