- java.lang.Object
-
- swim.store.mem.ListDataModel
-
- All Implemented Interfaces:
Iterable<Value>,Collection<Value>,List<Value>,ListData<Value>,DataBinding,ListDataBinding,KeyedList<Value>
public class ListDataModel extends Object implements ListDataBinding
-
-
Field Summary
Fields Modifier and Type Field Description protected ListDataContextdataContextprotected Valuenameprotected StoreBindingstoreBindingprotected STreeList<Value>tree
-
Constructor Summary
Constructors Constructor Description ListDataModel(Value name, STreeList<Value> tree)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd(int index, Value value)voidadd(int index, Value element, Object key)booleanadd(Value value)booleanadd(Value element, Object key)booleanaddAll(int index, Collection<? extends Value> values)booleanaddAll(Collection<? extends Value> values)voidclear()voidclose()booleancontains(Object value)booleancontainsAll(Collection<?> values)ListDataContextdataContext()longdataSize()voiddrop(int lower)ListIterator<Map.Entry<Object,Value>>entryIterator()Valueget(int index)Valueget(int index, Object key)Map.Entry<Object,Value>getEntry(int index)Map.Entry<Object,Value>getEntry(int index, Object key)intindexOf(Object value)booleanisEmpty()booleanisResident()ListDataModelisResident(boolean isResident)booleanisTransient()ListDataModelisTransient(boolean isTransient)Iterator<Value>iterator()ListIterator<Object>keyIterator()intlastIndexOf(Object value)ListIterator<Value>listIterator()ListIterator<Value>listIterator(int index)voidmove(int fromIndex, int toIndex)voidmove(int fromIndex, int toIndex, Object key)Valuename()Valueremove(int index)Valueremove(int index, Object key)booleanremove(Object value)booleanremoveAll(Collection<?> values)booleanretainAll(Collection<?> values)Valueset(int index, Value value)Valueset(int index, Value element, Object key)voidsetDataContext(ListDataContext dataContext)voidsetStoreBinding(StoreBinding storeBinding)intsize()KeyedList<Value>snapshot()An immutable copy of thisSTreeList's data.StoreBindingstoreBinding()List<Value>subList(int fromIndex, int toIndex)voidtake(int upper)Object[]toArray()<T> T[]toArray(T[] array)STreeList<Value>tree()<T> TunwrapData(Class<T> dataClass)<V2> ListData<V2>valueClass(Class<V2> valueClass)Form<Value>valueForm()<V2> ListData<V2>valueForm(Form<V2> valueForm)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArray
-
Methods inherited from interface java.util.List
equals, hashCode, replaceAll, sort, spliterator
-
-
-
-
Field Detail
-
name
protected final Value name
-
dataContext
protected ListDataContext dataContext
-
storeBinding
protected StoreBinding storeBinding
-
-
Method Detail
-
dataContext
public ListDataContext dataContext()
- Specified by:
dataContextin interfaceDataBinding- Specified by:
dataContextin interfaceListDataBinding
-
setDataContext
public void setDataContext(ListDataContext dataContext)
- Specified by:
setDataContextin interfaceListDataBinding
-
storeBinding
public StoreBinding storeBinding()
- Specified by:
storeBindingin interfaceDataBinding
-
setStoreBinding
public void setStoreBinding(StoreBinding storeBinding)
- Specified by:
setStoreBindingin interfaceDataBinding
-
unwrapData
public <T> T unwrapData(Class<T> dataClass)
- Specified by:
unwrapDatain interfaceDataBinding
-
name
public final Value name()
- Specified by:
namein interfaceDataBinding- Specified by:
namein interfaceListData<Value>
-
valueClass
public <V2> ListData<V2> valueClass(Class<V2> valueClass)
- Specified by:
valueClassin interfaceListData<Value>
-
dataSize
public long dataSize()
- Specified by:
dataSizein interfaceDataBinding
-
isResident
public boolean isResident()
- Specified by:
isResidentin interfaceDataBinding- Specified by:
isResidentin interfaceListData<Value>
-
isResident
public ListDataModel isResident(boolean isResident)
- Specified by:
isResidentin interfaceDataBinding- Specified by:
isResidentin interfaceListData<Value>- Specified by:
isResidentin interfaceListDataBinding
-
isTransient
public boolean isTransient()
- Specified by:
isTransientin interfaceDataBinding- Specified by:
isTransientin interfaceListData<Value>
-
isTransient
public ListDataModel isTransient(boolean isTransient)
- Specified by:
isTransientin interfaceDataBinding- Specified by:
isTransientin interfaceListData<Value>- Specified by:
isTransientin interfaceListDataBinding
-
size
public int size()
-
isEmpty
public boolean isEmpty()
-
contains
public boolean contains(Object value)
-
containsAll
public boolean containsAll(Collection<?> values)
- Specified by:
containsAllin interfaceCollection<Value>- Specified by:
containsAllin interfaceList<Value>
-
lastIndexOf
public int lastIndexOf(Object value)
- Specified by:
lastIndexOfin interfaceList<Value>
-
add
public boolean add(Value value)
-
addAll
public boolean addAll(Collection<? extends Value> values)
-
addAll
public boolean addAll(int index, Collection<? extends Value> values)
-
remove
public boolean remove(Object value)
-
removeAll
public boolean removeAll(Collection<?> values)
-
retainAll
public boolean retainAll(Collection<?> values)
-
clear
public void clear()
-
listIterator
public ListIterator<Value> listIterator()
- Specified by:
listIteratorin interfaceList<Value>
-
listIterator
public ListIterator<Value> listIterator(int index)
- Specified by:
listIteratorin interfaceList<Value>
-
toArray
public Object[] toArray()
-
toArray
public <T> T[] toArray(T[] array)
-
close
public void close()
- Specified by:
closein interfaceDataBinding- Specified by:
closein interfaceListData<Value>
-
move
public void move(int fromIndex, int toIndex, Object key)
-
keyIterator
public ListIterator<Object> keyIterator()
- Specified by:
keyIteratorin interfaceKeyedList<Value>
-
entryIterator
public ListIterator<Map.Entry<Object,Value>> entryIterator()
- Specified by:
entryIteratorin interfaceKeyedList<Value>
-
-