Module com.gluonhq.cloudlink.client
Class GluonObservableListImpl<E>
- java.lang.Object
-
- java.util.AbstractCollection<E>
-
- java.util.AbstractList<E>
-
- javafx.collections.ObservableListBase<E>
-
- javafx.collections.ModifiableObservableListBase<E>
-
- com.gluonhq.connect.GluonObservableList<E>
-
- com.gluonhq.impl.cloudlink.client.data.GluonObservableListImpl<E>
-
- All Implemented Interfaces:
GluonObservable,GluonObservableImpl<E>,Iterable<E>,Collection<E>,List<E>,Observable,ObservableList<E>,EventTarget
public class GluonObservableListImpl<E> extends GluonObservableList<E> implements GluonObservableImpl<E>
-
-
Property Summary
-
Properties inherited from class com.gluonhq.connect.GluonObservableList
exception, initialized, state
-
-
Field Summary
-
Fields inherited from class java.util.AbstractList
modCount
-
-
Constructor Summary
Constructors Constructor Description GluonObservableListImpl(DataClient dataClient, String identifier, ConnectMetadata<E> metadata, SyncFlag... syncFlags)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddLocalDataSkel(ListDataSkel<E> dataSkel)booleancontainsDataSkel(ListDataSkel<E> dataSkel)booleancontainsDataSkel(String uid)protected voiddoAdd(int index, E element)Adds theelementto the List at the position ofindex.protected EdoRemove(int index)Removes the element at position ofindex.protected EdoSet(int index, E element)Sets theelementin the List at the position ofindex.Eget(int index)Returns the element at the specified position in this list.ListDataSkel<E>getDataSkelByUid(String uid)StringgetIdentifier()Collection<ListDataSkel<E>>getLocalDataSkels()List<ListDataSkel<E>>getMarkedForRemoval()ConnectMetadata<E>getMetadata()booleanisListReadThrough()booleanisListWriteThrough()booleanisObjectReadThrough()booleanisObjectWriteThrough()voidremoveLocalDataSkel(ListDataSkel<E> dataSkel)intsize()Returns the number of elements in this list.voidupdateLocalDataSkel(ListDataSkel<E> dataSkel, String payload)-
Methods inherited from class com.gluonhq.connect.GluonObservableList
buildEventDispatchChain, exceptionProperty, getException, getState, initializedProperty, isInitialized, setException, setOnCancelled, setOnFailed, setOnReady, setOnRemoved, setOnRunning, setOnSucceeded, setState, stateProperty
-
Methods inherited from class javafx.collections.ModifiableObservableListBase
add, addAll, addAll, remove, remove, removeAll, removeRange, retainAll, set, setAll, subList
-
Methods inherited from class javafx.collections.ObservableListBase
addAll, addListener, addListener, beginChange, endChange, fireChange, hasListeners, nextAdd, nextPermutation, nextRemove, nextRemove, nextReplace, nextSet, nextUpdate, remove, removeAll, removeListener, removeListener, retainAll, setAll
-
Methods inherited from class java.util.AbstractList
add, clear, equals, hashCode, indexOf, iterator, lastIndexOf, listIterator, listIterator
-
Methods inherited from class java.util.AbstractCollection
contains, containsAll, isEmpty, toArray, toArray, toString
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArray
-
Methods inherited from interface java.util.List
add, add, addAll, addAll, clear, contains, containsAll, equals, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, replaceAll, retainAll, set, sort, spliterator, subList, toArray, toArray
-
Methods inherited from interface javafx.beans.Observable
addListener, removeListener
-
Methods inherited from interface javafx.collections.ObservableList
addAll, addListener, filtered, remove, removeAll, removeListener, retainAll, setAll, setAll, sorted, sorted
-
-
-
-
Constructor Detail
-
GluonObservableListImpl
public GluonObservableListImpl(DataClient dataClient, String identifier, ConnectMetadata<E> metadata, SyncFlag... syncFlags)
-
-
Method Detail
-
getIdentifier
public String getIdentifier()
- Specified by:
getIdentifierin interfaceGluonObservableImpl<E>
-
getMetadata
public ConnectMetadata<E> getMetadata()
-
get
public E get(int index)
Description copied from class:GluonObservableListReturns the element at the specified position in this list.
-
size
public int size()
Description copied from class:GluonObservableListReturns the number of elements in this list.- Specified by:
sizein interfaceCollection<E>- Specified by:
sizein interfaceList<E>- Overrides:
sizein classGluonObservableList<E>- Returns:
- the number of elements in this list
-
doAdd
protected void doAdd(int index, E element)Description copied from class:GluonObservableListAdds theelementto the List at the position ofindex.For the description of possible exceptions, please refer to the documentation of
AbstractList.add(java.lang.Object)method.- Overrides:
doAddin classGluonObservableList<E>- Parameters:
index- the position where to add the elementelement- the element that will be added
-
doSet
protected E doSet(int index, E element)
Description copied from class:GluonObservableListSets theelementin the List at the position ofindex.For the description of possible exceptions, please refer to the documentation of
ModifiableObservableListBase.set(int, java.lang.Object)method.- Overrides:
doSetin classGluonObservableList<E>- Parameters:
index- the position where to set the elementelement- the element that will be set at the specified position- Returns:
- the old element at the specified position
-
doRemove
protected E doRemove(int index)
Description copied from class:GluonObservableListRemoves the element at position ofindex.- Overrides:
doRemovein classGluonObservableList<E>- Parameters:
index- the index of the removed element- Returns:
- the removed element
-
isObjectReadThrough
public boolean isObjectReadThrough()
-
isListReadThrough
public boolean isListReadThrough()
-
isObjectWriteThrough
public boolean isObjectWriteThrough()
-
isListWriteThrough
public boolean isListWriteThrough()
-
getMarkedForRemoval
public List<ListDataSkel<E>> getMarkedForRemoval()
-
getLocalDataSkels
public Collection<ListDataSkel<E>> getLocalDataSkels()
-
containsDataSkel
public boolean containsDataSkel(String uid)
-
containsDataSkel
public boolean containsDataSkel(ListDataSkel<E> dataSkel)
-
getDataSkelByUid
public ListDataSkel<E> getDataSkelByUid(String uid)
-
updateLocalDataSkel
public void updateLocalDataSkel(ListDataSkel<E> dataSkel, String payload)
-
addLocalDataSkel
public void addLocalDataSkel(ListDataSkel<E> dataSkel)
-
removeLocalDataSkel
public void removeLocalDataSkel(ListDataSkel<E> dataSkel)
-
-