Class FlatListVal<E>
- java.lang.Object
-
- org.reactfx.ObservableBase<org.reactfx.collection.LiveList.Observer<? super E,?>,org.reactfx.collection.QuasiListChange<? extends E>>
-
- org.reactfx.collection.LiveListBase<E>
-
- net.sourceforge.pmd.util.fxdesigner.util.reactfx.FlatListVal<E>
-
- Type Parameters:
E-
- All Implemented Interfaces:
java.lang.Iterable<E>,java.util.Collection<E>,java.util.List<E>,javafx.beans.Observable,javafx.collections.ObservableList<E>,DefaultMutableLiveList<E>,org.reactfx.collection.LiveList<E>,org.reactfx.collection.ProperLiveList<E>,org.reactfx.Observable<org.reactfx.collection.LiveList.Observer<? super E,?>>,org.reactfx.ProperObservable<org.reactfx.collection.LiveList.Observer<? super E,?>,org.reactfx.collection.QuasiListChange<? extends E>>
public class FlatListVal<E> extends org.reactfx.collection.LiveListBase<E> implements DefaultMutableLiveList<E>
Turns aVal<LiveList<E>>into aLiveList<E>that is an empty, unmodifiable list when the base Val is null, and otherwise delegates everything (including mutation methods) to the underlying value.When the value changes a list change that deletes the list is emitted.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.reactfx.collection.LiveList
org.reactfx.collection.LiveList.Observer<E extends java.lang.Object,O extends java.lang.Object>, org.reactfx.collection.LiveList.QuasiChangeObserver<E extends java.lang.Object>, org.reactfx.collection.LiveList.QuasiModificationObserver<E extends java.lang.Object>
-
-
Constructor Summary
Constructors Constructor Description FlatListVal(org.reactfx.value.Val<? extends javafx.collections.ObservableList<E>> base)
-
Method Summary
All Methods Instance Methods Concrete Methods Default Methods Modifier and Type Method Description voidadd(int index, E element)booleanadd(E e)booleanaddAll(int index, java.util.Collection<? extends E> c)booleanaddAll(java.util.Collection<? extends E> c)voidclear()default booleancontains(java.lang.Object arg0)default booleancontainsAll(java.util.Collection<?> arg0)Eget(int index)default intindexOf(java.lang.Object arg0)default booleanisEmpty()default java.util.Iterator<E>iterator()default intlastIndexOf(java.lang.Object arg0)default java.util.ListIterator<E>listIterator()default java.util.ListIterator<E>listIterator(int arg0)protected org.reactfx.SubscriptionobserveInputs()Eremove(int index)voidremove(int from, int to)booleanremove(java.lang.Object o)booleanremoveAll(java.util.Collection<?> c)booleanretainAll(java.util.Collection<?> c)Eset(int index, E element)booleansetAll(java.util.Collection<? extends E> col)intsize()default java.util.List<E>subList(int arg0, int arg1)default java.lang.Object[]toArray()default <T extends java.lang.Object>
T[]toArray(T[] arg0)-
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 net.sourceforge.pmd.util.fxdesigner.util.reactfx.DefaultMutableLiveList
addAll, removeAll, retainAll, setAll
-
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.collection.ProperLiveList
contentReplacement, defaultEquals, defaultHashCode, defaultNotificationAccumulator, defaultToString, fireContentReplacement, fireElemInsertion, fireElemRemoval, fireElemReplacement, fireModification, fireRangeInsertion, fireRemoveRange
-
-
-
-
Constructor Detail
-
FlatListVal
public FlatListVal(org.reactfx.value.Val<? extends javafx.collections.ObservableList<E>> base)
-
-
Method Detail
-
observeInputs
protected org.reactfx.Subscription observeInputs()
-
size
public int size()
-
add
public boolean add(E e)
-
remove
public boolean remove(java.lang.Object o)
-
addAll
public boolean addAll(java.util.Collection<? extends E> c)
-
addAll
public boolean addAll(int index, java.util.Collection<? extends E> c)- Specified by:
addAllin interfacejava.util.List<E>
-
removeAll
public boolean removeAll(java.util.Collection<?> c)
-
retainAll
public boolean retainAll(java.util.Collection<?> c)
-
clear
public void clear()
-
setAll
public boolean setAll(java.util.Collection<? extends E> col)
- Specified by:
setAllin interfacejavafx.collections.ObservableList<E>
-
remove
public void remove(int from, int to)- Specified by:
removein interfacejavafx.collections.ObservableList<E>
-
isEmpty
public default boolean isEmpty()
- Specified by:
isEmptyin interfacejava.util.Collection<E extends java.lang.Object>- Specified by:
isEmptyin interfacejava.util.List<E extends java.lang.Object>
-
indexOf
public default int indexOf(java.lang.Object arg0)
- Specified by:
indexOfin interfacejava.util.List<E extends java.lang.Object>
-
lastIndexOf
public default int lastIndexOf(java.lang.Object arg0)
- Specified by:
lastIndexOfin interfacejava.util.List<E extends java.lang.Object>
-
contains
public default boolean contains(java.lang.Object arg0)
- Specified by:
containsin interfacejava.util.Collection<E extends java.lang.Object>- Specified by:
containsin interfacejava.util.List<E extends java.lang.Object>
-
containsAll
public default boolean containsAll(java.util.Collection<?> arg0)
- Specified by:
containsAllin interfacejava.util.Collection<E extends java.lang.Object>- Specified by:
containsAllin interfacejava.util.List<E extends java.lang.Object>
-
iterator
public default java.util.Iterator<E> iterator()
- Specified by:
iteratorin interfacejava.util.Collection<E extends java.lang.Object>- Specified by:
iteratorin interfacejava.lang.Iterable<E extends java.lang.Object>- Specified by:
iteratorin interfacejava.util.List<E extends java.lang.Object>
-
listIterator
public default java.util.ListIterator<E> listIterator()
- Specified by:
listIteratorin interfacejava.util.List<E extends java.lang.Object>
-
listIterator
public default java.util.ListIterator<E> listIterator(int arg0)
- Specified by:
listIteratorin interfacejava.util.List<E extends java.lang.Object>
-
subList
public default java.util.List<E> subList(int arg0, int arg1)- Specified by:
subListin interfacejava.util.List<E extends java.lang.Object>
-
toArray
public default java.lang.Object[] toArray()
- Specified by:
toArrayin interfacejava.util.Collection<E extends java.lang.Object>- Specified by:
toArrayin interfacejava.util.List<E extends java.lang.Object>
-
toArray
public default <T extends java.lang.Object> T[] toArray(T[] arg0)
- Specified by:
toArrayin interfacejava.util.Collection<E extends java.lang.Object>- Specified by:
toArrayin interfacejava.util.List<E extends java.lang.Object>
-
-