- java.lang.Object
-
- swim.store.mem.MapDataModel
-
- All Implemented Interfaces:
Iterable<Map.Entry<swim.structure.Value,swim.structure.Value>>,Map<swim.structure.Value,swim.structure.Value>,SortedMap<swim.structure.Value,swim.structure.Value>,swim.api.data.MapData<swim.structure.Value,swim.structure.Value>,swim.store.DataBinding,swim.store.MapDataBinding,swim.util.IterableMap<swim.structure.Value,swim.structure.Value>,swim.util.OrderedMap<swim.structure.Value,swim.structure.Value>
public class MapDataModel extends Object implements swim.store.MapDataBinding
-
-
Field Summary
Fields Modifier and Type Field Description protected swim.store.MapDataContextdataContextprotected swim.structure.Valuenameprotected swim.store.StoreBindingstoreBindingprotected swim.collections.BTreeMap<swim.structure.Value,swim.structure.Value,swim.structure.Value>tree
-
Constructor Summary
Constructors Constructor Description MapDataModel(swim.structure.Value name, swim.collections.BTreeMap<swim.structure.Value,swim.structure.Value,swim.structure.Value> tree)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclear()voidclose()Comparator<? super swim.structure.Value>comparator()booleancontainsKey(Object key)booleancontainsValue(Object value)swim.store.MapDataContextdataContext()longdataSize()voiddrop(int lower)Set<Map.Entry<swim.structure.Value,swim.structure.Value>>entrySet()Map.Entry<swim.structure.Value,swim.structure.Value>firstEntry()swim.structure.ValuefirstKey()swim.structure.ValuefirstValue()swim.structure.Valueget(Object key)Map.Entry<swim.structure.Value,swim.structure.Value>getEntry(Object key)Map.Entry<swim.structure.Value,swim.structure.Value>getIndex(int index)swim.util.OrderedMap<swim.structure.Value,swim.structure.Value>headMap(swim.structure.Value toKey)intindexOf(Object key)booleanisEmpty()booleanisResident()swim.store.MapDataBindingisResident(boolean isResident)booleanisTransient()swim.store.MapDataBindingisTransient(boolean isTransient)swim.util.OrderedMapCursor<swim.structure.Value,swim.structure.Value>iterator()<K2> swim.api.data.MapData<K2,swim.structure.Value>keyClass(Class<K2> keyClass)swim.structure.Form<swim.structure.Value>keyForm()<K2> swim.api.data.MapData<K2,swim.structure.Value>keyForm(swim.structure.Form<K2> keyForm)swim.util.Cursor<swim.structure.Value>keyIterator()Set<swim.structure.Value>keySet()Map.Entry<swim.structure.Value,swim.structure.Value>lastEntry()swim.structure.ValuelastKey()swim.structure.ValuelastValue()swim.structure.Valuename()Map.Entry<swim.structure.Value,swim.structure.Value>nextEntry(swim.structure.Value key)swim.structure.ValuenextKey(swim.structure.Value key)swim.structure.ValuenextValue(swim.structure.Value key)Map.Entry<swim.structure.Value,swim.structure.Value>previousEntry(swim.structure.Value key)swim.structure.ValuepreviousKey(swim.structure.Value key)swim.structure.ValuepreviousValue(swim.structure.Value key)swim.structure.Valueput(swim.structure.Value key, swim.structure.Value value)voidputAll(Map<? extends swim.structure.Value,? extends swim.structure.Value> items)swim.structure.Valueremove(Object key)voidsetDataContext(swim.store.MapDataContext dataContext)voidsetStoreBinding(swim.store.StoreBinding storeBinding)intsize()swim.util.OrderedMap<swim.structure.Value,swim.structure.Value>snapshot()swim.store.StoreBindingstoreBinding()swim.util.OrderedMap<swim.structure.Value,swim.structure.Value>subMap(swim.structure.Value fromKey, swim.structure.Value toKey)swim.util.OrderedMap<swim.structure.Value,swim.structure.Value>tailMap(swim.structure.Value fromKey)voidtake(int upper)swim.collections.BTreeMap<swim.structure.Value,swim.structure.Value,swim.structure.Value>tree()<T> TunwrapData(Class<T> dataClass)<V2> swim.api.data.MapData<swim.structure.Value,V2>valueClass(Class<V2> valueClass)swim.structure.Form<swim.structure.Value>valueForm()<V2> swim.api.data.MapData<swim.structure.Value,V2>valueForm(swim.structure.Form<V2> valueForm)swim.util.Cursor<swim.structure.Value>valueIterator()Collection<swim.structure.Value>values()-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Methods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, equals, forEach, getOrDefault, hashCode, merge, putIfAbsent, remove, replace, replace, replaceAll
-
-
-
-
Method Detail
-
dataContext
public swim.store.MapDataContext dataContext()
- Specified by:
dataContextin interfaceswim.store.DataBinding- Specified by:
dataContextin interfaceswim.store.MapDataBinding
-
setDataContext
public void setDataContext(swim.store.MapDataContext dataContext)
- Specified by:
setDataContextin interfaceswim.store.MapDataBinding
-
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.collections.BTreeMap<swim.structure.Value,swim.structure.Value,swim.structure.Value> tree()
-
name
public final swim.structure.Value name()
- Specified by:
namein interfaceswim.store.DataBinding- Specified by:
namein interfaceswim.api.data.MapData<swim.structure.Value,swim.structure.Value>
-
keyForm
public swim.structure.Form<swim.structure.Value> keyForm()
- Specified by:
keyFormin interfaceswim.api.data.MapData<swim.structure.Value,swim.structure.Value>
-
keyForm
public <K2> swim.api.data.MapData<K2,swim.structure.Value> keyForm(swim.structure.Form<K2> keyForm)
- Specified by:
keyFormin interfaceswim.api.data.MapData<swim.structure.Value,swim.structure.Value>
-
keyClass
public <K2> swim.api.data.MapData<K2,swim.structure.Value> keyClass(Class<K2> keyClass)
- Specified by:
keyClassin interfaceswim.api.data.MapData<swim.structure.Value,swim.structure.Value>
-
valueForm
public swim.structure.Form<swim.structure.Value> valueForm()
- Specified by:
valueFormin interfaceswim.api.data.MapData<swim.structure.Value,swim.structure.Value>
-
valueForm
public <V2> swim.api.data.MapData<swim.structure.Value,V2> valueForm(swim.structure.Form<V2> valueForm)
- Specified by:
valueFormin interfaceswim.api.data.MapData<swim.structure.Value,swim.structure.Value>
-
valueClass
public <V2> swim.api.data.MapData<swim.structure.Value,V2> valueClass(Class<V2> valueClass)
- Specified by:
valueClassin interfaceswim.api.data.MapData<swim.structure.Value,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.MapData<swim.structure.Value,swim.structure.Value>
-
isResident
public swim.store.MapDataBinding isResident(boolean isResident)
- Specified by:
isResidentin interfaceswim.store.DataBinding- Specified by:
isResidentin interfaceswim.api.data.MapData<swim.structure.Value,swim.structure.Value>- Specified by:
isResidentin interfaceswim.store.MapDataBinding
-
isTransient
public boolean isTransient()
- Specified by:
isTransientin interfaceswim.store.DataBinding- Specified by:
isTransientin interfaceswim.api.data.MapData<swim.structure.Value,swim.structure.Value>
-
isTransient
public swim.store.MapDataBinding isTransient(boolean isTransient)
- Specified by:
isTransientin interfaceswim.store.DataBinding- Specified by:
isTransientin interfaceswim.api.data.MapData<swim.structure.Value,swim.structure.Value>- Specified by:
isTransientin interfaceswim.store.MapDataBinding
-
isEmpty
public boolean isEmpty()
-
size
public int size()
-
containsKey
public boolean containsKey(Object key)
- Specified by:
containsKeyin interfaceswim.util.IterableMap<swim.structure.Value,swim.structure.Value>- Specified by:
containsKeyin interfaceMap<swim.structure.Value,swim.structure.Value>- Specified by:
containsKeyin interfaceswim.util.OrderedMap<swim.structure.Value,swim.structure.Value>
-
containsValue
public boolean containsValue(Object value)
- Specified by:
containsValuein interfaceswim.util.IterableMap<swim.structure.Value,swim.structure.Value>- Specified by:
containsValuein interfaceMap<swim.structure.Value,swim.structure.Value>- Specified by:
containsValuein interfaceswim.util.OrderedMap<swim.structure.Value,swim.structure.Value>
-
indexOf
public int indexOf(Object key)
- Specified by:
indexOfin interfaceswim.util.OrderedMap<swim.structure.Value,swim.structure.Value>
-
get
public swim.structure.Value get(Object key)
-
getEntry
public Map.Entry<swim.structure.Value,swim.structure.Value> getEntry(Object key)
- Specified by:
getEntryin interfaceswim.util.OrderedMap<swim.structure.Value,swim.structure.Value>
-
getIndex
public Map.Entry<swim.structure.Value,swim.structure.Value> getIndex(int index)
- Specified by:
getIndexin interfaceswim.util.OrderedMap<swim.structure.Value,swim.structure.Value>
-
firstEntry
public Map.Entry<swim.structure.Value,swim.structure.Value> firstEntry()
- Specified by:
firstEntryin interfaceswim.util.OrderedMap<swim.structure.Value,swim.structure.Value>
-
firstKey
public swim.structure.Value firstKey()
-
firstValue
public swim.structure.Value firstValue()
- Specified by:
firstValuein interfaceswim.util.OrderedMap<swim.structure.Value,swim.structure.Value>
-
lastEntry
public Map.Entry<swim.structure.Value,swim.structure.Value> lastEntry()
- Specified by:
lastEntryin interfaceswim.util.OrderedMap<swim.structure.Value,swim.structure.Value>
-
lastKey
public swim.structure.Value lastKey()
-
lastValue
public swim.structure.Value lastValue()
- Specified by:
lastValuein interfaceswim.util.OrderedMap<swim.structure.Value,swim.structure.Value>
-
nextEntry
public Map.Entry<swim.structure.Value,swim.structure.Value> nextEntry(swim.structure.Value key)
- Specified by:
nextEntryin interfaceswim.util.OrderedMap<swim.structure.Value,swim.structure.Value>
-
nextKey
public swim.structure.Value nextKey(swim.structure.Value key)
- Specified by:
nextKeyin interfaceswim.util.OrderedMap<swim.structure.Value,swim.structure.Value>
-
nextValue
public swim.structure.Value nextValue(swim.structure.Value key)
- Specified by:
nextValuein interfaceswim.util.OrderedMap<swim.structure.Value,swim.structure.Value>
-
previousEntry
public Map.Entry<swim.structure.Value,swim.structure.Value> previousEntry(swim.structure.Value key)
- Specified by:
previousEntryin interfaceswim.util.OrderedMap<swim.structure.Value,swim.structure.Value>
-
previousKey
public swim.structure.Value previousKey(swim.structure.Value key)
- Specified by:
previousKeyin interfaceswim.util.OrderedMap<swim.structure.Value,swim.structure.Value>
-
previousValue
public swim.structure.Value previousValue(swim.structure.Value key)
- Specified by:
previousValuein interfaceswim.util.OrderedMap<swim.structure.Value,swim.structure.Value>
-
put
public swim.structure.Value put(swim.structure.Value key, swim.structure.Value value)
-
putAll
public void putAll(Map<? extends swim.structure.Value,? extends swim.structure.Value> items)
-
remove
public swim.structure.Value remove(Object key)
-
drop
public void drop(int lower)
- Specified by:
dropin interfaceswim.api.data.MapData<swim.structure.Value,swim.structure.Value>
-
take
public void take(int upper)
- Specified by:
takein interfaceswim.api.data.MapData<swim.structure.Value,swim.structure.Value>
-
clear
public void clear()
-
headMap
public swim.util.OrderedMap<swim.structure.Value,swim.structure.Value> headMap(swim.structure.Value toKey)
-
tailMap
public swim.util.OrderedMap<swim.structure.Value,swim.structure.Value> tailMap(swim.structure.Value fromKey)
-
subMap
public swim.util.OrderedMap<swim.structure.Value,swim.structure.Value> subMap(swim.structure.Value fromKey, swim.structure.Value toKey)
-
entrySet
public Set<Map.Entry<swim.structure.Value,swim.structure.Value>> entrySet()
- Specified by:
entrySetin interfaceswim.util.IterableMap<swim.structure.Value,swim.structure.Value>- Specified by:
entrySetin interfaceMap<swim.structure.Value,swim.structure.Value>- Specified by:
entrySetin interfaceswim.util.OrderedMap<swim.structure.Value,swim.structure.Value>- Specified by:
entrySetin interfaceSortedMap<swim.structure.Value,swim.structure.Value>
-
keySet
public Set<swim.structure.Value> keySet()
- Specified by:
keySetin interfaceswim.util.IterableMap<swim.structure.Value,swim.structure.Value>- Specified by:
keySetin interfaceMap<swim.structure.Value,swim.structure.Value>- Specified by:
keySetin interfaceswim.util.OrderedMap<swim.structure.Value,swim.structure.Value>- Specified by:
keySetin interfaceSortedMap<swim.structure.Value,swim.structure.Value>
-
values
public Collection<swim.structure.Value> values()
- Specified by:
valuesin interfaceswim.util.IterableMap<swim.structure.Value,swim.structure.Value>- Specified by:
valuesin interfaceMap<swim.structure.Value,swim.structure.Value>- Specified by:
valuesin interfaceswim.util.OrderedMap<swim.structure.Value,swim.structure.Value>- Specified by:
valuesin interfaceSortedMap<swim.structure.Value,swim.structure.Value>
-
iterator
public swim.util.OrderedMapCursor<swim.structure.Value,swim.structure.Value> iterator()
- Specified by:
iteratorin interfaceIterable<Map.Entry<swim.structure.Value,swim.structure.Value>>- Specified by:
iteratorin interfaceswim.util.IterableMap<swim.structure.Value,swim.structure.Value>- Specified by:
iteratorin interfaceswim.util.OrderedMap<swim.structure.Value,swim.structure.Value>
-
keyIterator
public swim.util.Cursor<swim.structure.Value> keyIterator()
- Specified by:
keyIteratorin interfaceswim.util.IterableMap<swim.structure.Value,swim.structure.Value>- Specified by:
keyIteratorin interfaceswim.util.OrderedMap<swim.structure.Value,swim.structure.Value>
-
valueIterator
public swim.util.Cursor<swim.structure.Value> valueIterator()
- Specified by:
valueIteratorin interfaceswim.util.IterableMap<swim.structure.Value,swim.structure.Value>- Specified by:
valueIteratorin interfaceswim.util.OrderedMap<swim.structure.Value,swim.structure.Value>
-
snapshot
public swim.util.OrderedMap<swim.structure.Value,swim.structure.Value> snapshot()
- Specified by:
snapshotin interfaceswim.api.data.MapData<swim.structure.Value,swim.structure.Value>
-
comparator
public Comparator<? super swim.structure.Value> comparator()
- Specified by:
comparatorin interfaceswim.util.OrderedMap<swim.structure.Value,swim.structure.Value>- Specified by:
comparatorin interfaceSortedMap<swim.structure.Value,swim.structure.Value>
-
close
public void close()
- Specified by:
closein interfaceswim.store.DataBinding- Specified by:
closein interfaceswim.api.data.MapData<swim.structure.Value,swim.structure.Value>
-
-