- java.lang.Object
-
- swim.store.db.ListDataModel
-
- All Implemented Interfaces:
Iterable<swim.structure.Value>,Collection<swim.structure.Value>,List<swim.structure.Value>,swim.api.data.ListData<swim.structure.Value>,swim.db.STreeDelegate,swim.db.TreeDelegate,swim.store.DataBinding,swim.store.ListDataBinding,swim.util.KeyedList<swim.structure.Value>
public class ListDataModel extends Object implements swim.store.ListDataBinding, swim.db.STreeDelegate
-
-
Field Summary
Fields Modifier and Type Field Description protected swim.store.ListDataContextdataContextprotected swim.structure.Valuenameprotected swim.store.StoreBindingstoreBindingprotected swim.db.STreeListtree
-
Constructor Summary
Constructors Constructor Description ListDataModel(swim.structure.Value name, swim.db.STreeList tree)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd(int index, swim.structure.Value value)voidadd(int index, swim.structure.Value element, Object key)booleanadd(swim.structure.Value value)booleanadd(swim.structure.Value element, Object key)booleanaddAll(int index, Collection<? extends swim.structure.Value> values)booleanaddAll(Collection<? extends swim.structure.Value> values)voidclear()voidclose()booleancontains(Object value)booleancontainsAll(Collection<?> values)swim.db.Databasedatabase()swim.store.ListDataContextdataContext()longdataSize()voiddrop(int lower)ListIterator<Map.Entry<Object,swim.structure.Value>>entryIterator()swim.structure.Valueget(int index)swim.structure.Valueget(int index, Object key)Map.Entry<Object,swim.structure.Value>getEntry(int index)Map.Entry<Object,swim.structure.Value>getEntry(int index, Object key)intindexOf(Object value)booleanisEmpty()booleanisResident()ListDataModelisResident(boolean isResident)booleanisTransient()ListDataModelisTransient(boolean isTransient)Iterator<swim.structure.Value>iterator()ListIterator<Object>keyIterator()intlastIndexOf(Object value)ListIterator<swim.structure.Value>listIterator()ListIterator<swim.structure.Value>listIterator(int index)voidmove(int fromIndex, int toIndex)voidmove(int fromIndex, int toIndex, Object key)swim.structure.Valuename()swim.structure.Valueremove(int index)swim.structure.Valueremove(int index, Object key)booleanremove(Object value)booleanremoveAll(Collection<?> values)booleanretainAll(Collection<?> values)swim.structure.Valueset(int index, swim.structure.Value value)swim.structure.Valueset(int index, swim.structure.Value element, Object key)voidsetDataContext(swim.store.ListDataContext dataContext)voidsetStoreBinding(swim.store.StoreBinding storeBinding)intsize()swim.util.KeyedList<swim.structure.Value>snapshot()swim.db.Storestore()swim.store.StoreBindingstoreBinding()voidstreeDidDrop(swim.db.STree newTree, swim.db.STree oldTree, long lower)voidstreeDidInsert(swim.db.STree newTree, swim.db.STree oldTree, long index, swim.structure.Value id, swim.structure.Value newValue)voidstreeDidRemove(swim.db.STree newTree, swim.db.STree oldTree, long index, swim.structure.Value id, swim.structure.Value oldValue)voidstreeDidTake(swim.db.STree newTree, swim.db.STree oldTree, long upper)voidstreeDidUpdate(swim.db.STree newTree, swim.db.STree oldTree, long index, swim.structure.Value id, swim.structure.Value newValue, swim.structure.Value oldValue)List<swim.structure.Value>subList(int fromIndex, int toIndex)voidtake(int upper)Object[]toArray()<T> T[]toArray(T[] array)swim.db.STreeListtree()voidtreeDidChange(swim.db.Tree newTree, swim.db.Tree oldTree)voidtreeDidClear(swim.db.Tree newTree, swim.db.Tree oldTree)voidtreeDidCommit(swim.db.Tree newTree, swim.db.Tree oldTree)voidtreeDidLoadPage(swim.db.Page page)swim.structure.ValuetreeName()<T> TunwrapData(Class<T> dataClass)<V2> swim.api.data.ListData<V2>valueClass(Class<V2> valueClass)swim.structure.Form<swim.structure.Value>valueForm()<V2> swim.api.data.ListData<V2>valueForm(swim.structure.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
-
-
-
-
Method Detail
-
dataContext
public swim.store.ListDataContext dataContext()
- Specified by:
dataContextin interfaceswim.store.DataBinding- Specified by:
dataContextin interfaceswim.store.ListDataBinding
-
setDataContext
public void setDataContext(swim.store.ListDataContext dataContext)
- Specified by:
setDataContextin interfaceswim.store.ListDataBinding
-
storeBinding
public swim.store.StoreBinding storeBinding()
- Specified by:
storeBindingin interfaceswim.store.DataBinding
-
setStoreBinding
public void setStoreBinding(swim.store.StoreBinding storeBinding)
- Specified by:
setStoreBindingin interfaceswim.store.DataBinding
-
unwrapData
public <T> T unwrapData(Class<T> dataClass)
- Specified by:
unwrapDatain interfaceswim.store.DataBinding
-
tree
public final swim.db.STreeList tree()
-
database
public final swim.db.Database database()
-
store
public final swim.db.Store store()
-
treeName
public final swim.structure.Value treeName()
-
name
public final swim.structure.Value name()
- Specified by:
namein interfaceswim.store.DataBinding- Specified by:
namein interfaceswim.api.data.ListData<swim.structure.Value>
-
valueForm
public swim.structure.Form<swim.structure.Value> valueForm()
- Specified by:
valueFormin interfaceswim.api.data.ListData<swim.structure.Value>
-
valueForm
public <V2> swim.api.data.ListData<V2> valueForm(swim.structure.Form<V2> valueForm)
- Specified by:
valueFormin interfaceswim.api.data.ListData<swim.structure.Value>
-
valueClass
public <V2> swim.api.data.ListData<V2> valueClass(Class<V2> valueClass)
- Specified by:
valueClassin interfaceswim.api.data.ListData<swim.structure.Value>
-
dataSize
public long dataSize()
- Specified by:
dataSizein interfaceswim.store.DataBinding
-
isResident
public boolean isResident()
- Specified by:
isResidentin interfaceswim.store.DataBinding- Specified by:
isResidentin interfaceswim.api.data.ListData<swim.structure.Value>
-
isResident
public ListDataModel isResident(boolean isResident)
- Specified by:
isResidentin interfaceswim.store.DataBinding- Specified by:
isResidentin interfaceswim.api.data.ListData<swim.structure.Value>- Specified by:
isResidentin interfaceswim.store.ListDataBinding
-
isTransient
public boolean isTransient()
- Specified by:
isTransientin interfaceswim.store.DataBinding- Specified by:
isTransientin interfaceswim.api.data.ListData<swim.structure.Value>
-
isTransient
public ListDataModel isTransient(boolean isTransient)
- Specified by:
isTransientin interfaceswim.store.DataBinding- Specified by:
isTransientin interfaceswim.api.data.ListData<swim.structure.Value>- Specified by:
isTransientin interfaceswim.store.ListDataBinding
-
size
public int size()
- Specified by:
sizein interfaceCollection<swim.structure.Value>- Specified by:
sizein interfaceList<swim.structure.Value>
-
isEmpty
public boolean isEmpty()
- Specified by:
isEmptyin interfaceCollection<swim.structure.Value>- Specified by:
isEmptyin interfaceList<swim.structure.Value>
-
contains
public boolean contains(Object value)
- Specified by:
containsin interfaceCollection<swim.structure.Value>- Specified by:
containsin interfaceList<swim.structure.Value>
-
containsAll
public boolean containsAll(Collection<?> values)
- Specified by:
containsAllin interfaceCollection<swim.structure.Value>- Specified by:
containsAllin interfaceList<swim.structure.Value>
-
indexOf
public int indexOf(Object value)
-
lastIndexOf
public int lastIndexOf(Object value)
- Specified by:
lastIndexOfin interfaceList<swim.structure.Value>
-
get
public swim.structure.Value get(int index)
-
set
public swim.structure.Value set(int index, swim.structure.Value value)
-
add
public boolean add(swim.structure.Value value)
- Specified by:
addin interfaceCollection<swim.structure.Value>- Specified by:
addin interfaceList<swim.structure.Value>
-
addAll
public boolean addAll(Collection<? extends swim.structure.Value> values)
- Specified by:
addAllin interfaceCollection<swim.structure.Value>- Specified by:
addAllin interfaceList<swim.structure.Value>
-
add
public void add(int index, swim.structure.Value value)
-
addAll
public boolean addAll(int index, Collection<? extends swim.structure.Value> values)
-
remove
public swim.structure.Value remove(int index)
-
remove
public boolean remove(Object value)
- Specified by:
removein interfaceCollection<swim.structure.Value>- Specified by:
removein interfaceList<swim.structure.Value>
-
removeAll
public boolean removeAll(Collection<?> values)
- Specified by:
removeAllin interfaceCollection<swim.structure.Value>- Specified by:
removeAllin interfaceList<swim.structure.Value>
-
retainAll
public boolean retainAll(Collection<?> values)
- Specified by:
retainAllin interfaceCollection<swim.structure.Value>- Specified by:
retainAllin interfaceList<swim.structure.Value>
-
drop
public void drop(int lower)
- Specified by:
dropin interfaceswim.api.data.ListData<swim.structure.Value>
-
take
public void take(int upper)
- Specified by:
takein interfaceswim.api.data.ListData<swim.structure.Value>
-
clear
public void clear()
- Specified by:
clearin interfaceCollection<swim.structure.Value>- Specified by:
clearin interfaceList<swim.structure.Value>
-
iterator
public Iterator<swim.structure.Value> iterator()
-
listIterator
public ListIterator<swim.structure.Value> listIterator()
- Specified by:
listIteratorin interfaceList<swim.structure.Value>
-
listIterator
public ListIterator<swim.structure.Value> listIterator(int index)
- Specified by:
listIteratorin interfaceList<swim.structure.Value>
-
subList
public List<swim.structure.Value> subList(int fromIndex, int toIndex)
-
snapshot
public swim.util.KeyedList<swim.structure.Value> snapshot()
- Specified by:
snapshotin interfaceswim.api.data.ListData<swim.structure.Value>
-
toArray
public Object[] toArray()
- Specified by:
toArrayin interfaceCollection<swim.structure.Value>- Specified by:
toArrayin interfaceList<swim.structure.Value>
-
toArray
public <T> T[] toArray(T[] array)
- Specified by:
toArrayin interfaceCollection<swim.structure.Value>- Specified by:
toArrayin interfaceList<swim.structure.Value>
-
close
public void close()
- Specified by:
closein interfaceswim.store.DataBinding- Specified by:
closein interfaceswim.api.data.ListData<swim.structure.Value>
-
get
public swim.structure.Value get(int index, Object key)- Specified by:
getin interfaceswim.util.KeyedList<swim.structure.Value>
-
getEntry
public Map.Entry<Object,swim.structure.Value> getEntry(int index)
- Specified by:
getEntryin interfaceswim.util.KeyedList<swim.structure.Value>
-
getEntry
public Map.Entry<Object,swim.structure.Value> getEntry(int index, Object key)
- Specified by:
getEntryin interfaceswim.util.KeyedList<swim.structure.Value>
-
set
public swim.structure.Value set(int index, swim.structure.Value element, Object key)- Specified by:
setin interfaceswim.util.KeyedList<swim.structure.Value>
-
add
public boolean add(swim.structure.Value element, Object key)- Specified by:
addin interfaceswim.util.KeyedList<swim.structure.Value>
-
add
public void add(int index, swim.structure.Value element, Object key)- Specified by:
addin interfaceswim.util.KeyedList<swim.structure.Value>
-
remove
public swim.structure.Value remove(int index, Object key)- Specified by:
removein interfaceswim.util.KeyedList<swim.structure.Value>
-
move
public void move(int fromIndex, int toIndex)- Specified by:
movein interfaceswim.util.KeyedList<swim.structure.Value>
-
move
public void move(int fromIndex, int toIndex, Object key)- Specified by:
movein interfaceswim.util.KeyedList<swim.structure.Value>
-
keyIterator
public ListIterator<Object> keyIterator()
- Specified by:
keyIteratorin interfaceswim.util.KeyedList<swim.structure.Value>
-
entryIterator
public ListIterator<Map.Entry<Object,swim.structure.Value>> entryIterator()
- Specified by:
entryIteratorin interfaceswim.util.KeyedList<swim.structure.Value>
-
treeDidLoadPage
public void treeDidLoadPage(swim.db.Page page)
- Specified by:
treeDidLoadPagein interfaceswim.db.TreeDelegate
-
treeDidChange
public void treeDidChange(swim.db.Tree newTree, swim.db.Tree oldTree)- Specified by:
treeDidChangein interfaceswim.db.TreeDelegate
-
treeDidCommit
public void treeDidCommit(swim.db.Tree newTree, swim.db.Tree oldTree)- Specified by:
treeDidCommitin interfaceswim.db.TreeDelegate
-
treeDidClear
public void treeDidClear(swim.db.Tree newTree, swim.db.Tree oldTree)- Specified by:
treeDidClearin interfaceswim.db.TreeDelegate
-
streeDidUpdate
public void streeDidUpdate(swim.db.STree newTree, swim.db.STree oldTree, long index, swim.structure.Value id, swim.structure.Value newValue, swim.structure.Value oldValue)- Specified by:
streeDidUpdatein interfaceswim.db.STreeDelegate
-
streeDidInsert
public void streeDidInsert(swim.db.STree newTree, swim.db.STree oldTree, long index, swim.structure.Value id, swim.structure.Value newValue)- Specified by:
streeDidInsertin interfaceswim.db.STreeDelegate
-
streeDidRemove
public void streeDidRemove(swim.db.STree newTree, swim.db.STree oldTree, long index, swim.structure.Value id, swim.structure.Value oldValue)- Specified by:
streeDidRemovein interfaceswim.db.STreeDelegate
-
streeDidDrop
public void streeDidDrop(swim.db.STree newTree, swim.db.STree oldTree, long lower)- Specified by:
streeDidDropin interfaceswim.db.STreeDelegate
-
streeDidTake
public void streeDidTake(swim.db.STree newTree, swim.db.STree oldTree, long upper)- Specified by:
streeDidTakein interfaceswim.db.STreeDelegate
-
-