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 void
addLocalDataSkel(ListDataSkel<E> dataSkel)
boolean
containsDataSkel(ListDataSkel<E> dataSkel)
boolean
containsDataSkel(String uid)
protected void
doAdd(int index, E element)
Adds theelement
to the List at the position ofindex
.protected E
doRemove(int index)
Removes the element at position ofindex
.protected E
doSet(int index, E element)
Sets theelement
in the List at the position ofindex
.E
get(int index)
Returns the element at the specified position in this list.ListDataSkel<E>
getDataSkelByUid(String uid)
String
getIdentifier()
Collection<ListDataSkel<E>>
getLocalDataSkels()
List<ListDataSkel<E>>
getMarkedForRemoval()
ConnectMetadata<E>
getMetadata()
boolean
isListReadThrough()
boolean
isListWriteThrough()
boolean
isObjectReadThrough()
boolean
isObjectWriteThrough()
void
removeLocalDataSkel(ListDataSkel<E> dataSkel)
int
size()
Returns the number of elements in this list.void
updateLocalDataSkel(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:
getIdentifier
in interfaceGluonObservableImpl<E>
-
getMetadata
public ConnectMetadata<E> getMetadata()
-
get
public E get(int index)
Description copied from class:GluonObservableList
Returns the element at the specified position in this list.
-
size
public int size()
Description copied from class:GluonObservableList
Returns the number of elements in this list.- Specified by:
size
in interfaceCollection<E>
- Specified by:
size
in interfaceList<E>
- Overrides:
size
in classGluonObservableList<E>
- Returns:
- the number of elements in this list
-
doAdd
protected void doAdd(int index, E element)
Description copied from class:GluonObservableList
Adds theelement
to 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:
doAdd
in 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:GluonObservableList
Sets theelement
in 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:
doSet
in 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:GluonObservableList
Removes the element at position ofindex
.- Overrides:
doRemove
in 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)
-
-