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>
-
Nested Class Summary
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected swim.store.MapDataContextprotected final swim.structure.Valueprotected swim.store.StoreBindingprotected final swim.collections.BTreeMap<swim.structure.Value,swim.structure.Value, swim.structure.Value> -
Constructor Summary
ConstructorsConstructorDescriptionMapDataModel(swim.structure.Value name, swim.collections.BTreeMap<swim.structure.Value, swim.structure.Value, swim.structure.Value> tree) -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()voidclose()Comparator<? super swim.structure.Value>booleancontainsKey(Object key) booleancontainsValue(Object value) swim.store.MapDataContextlongdataSize()voiddrop(int lower) entrySet()Map.Entry<swim.structure.Value,swim.structure.Value> swim.structure.ValuefirstKey()swim.structure.Valueswim.structure.ValueMap.Entry<swim.structure.Value,swim.structure.Value> 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) intbooleanisEmpty()booleanswim.store.MapDataBindingisResident(boolean isResident) booleanswim.store.MapDataBindingisTransient(boolean isTransient) swim.util.OrderedMapCursor<swim.structure.Value,swim.structure.Value> iterator()<K2> swim.api.data.MapData<K2,swim.structure.Value> 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>Set<swim.structure.Value>keySet()Map.Entry<swim.structure.Value,swim.structure.Value> swim.structure.ValuelastKey()swim.structure.Valuefinal 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) voidswim.structure.ValuevoidsetDataContext(swim.store.MapDataContext dataContext) voidsetStoreBinding(swim.store.StoreBinding storeBinding) intsize()swim.util.OrderedMap<swim.structure.Value,swim.structure.Value> snapshot()swim.store.StoreBindingswim.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) final 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><V2> swim.api.data.MapData<swim.structure.Value,V2> valueForm(swim.structure.Form<V2> valueForm) swim.util.Cursor<swim.structure.Value>Collection<swim.structure.Value>values()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliteratorMethods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, equals, forEach, getOrDefault, hashCode, merge, putIfAbsent, remove, replace, replace, replaceAll
-
Field Details
-
name
protected final swim.structure.Value name -
tree
protected final swim.collections.BTreeMap<swim.structure.Value,swim.structure.Value, treeswim.structure.Value> -
dataContext
protected swim.store.MapDataContext dataContext -
storeBinding
protected swim.store.StoreBinding storeBinding
-
-
Constructor Details
-
MapDataModel
public MapDataModel(swim.structure.Value name, swim.collections.BTreeMap<swim.structure.Value, swim.structure.Value, swim.structure.Value> tree)
-
-
Method Details
-
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
- Specified by:
unwrapDatain interfaceswim.store.DataBinding
-
tree
public final swim.collections.BTreeMap<swim.structure.Value,swim.structure.Value, tree()swim.structure.Value> -
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
- 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
- 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
- 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
- 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
- Specified by:
indexOfin interfaceswim.util.OrderedMap<swim.structure.Value,swim.structure.Value>
-
get
-
getEntry
- Specified by:
getEntryin interfaceswim.util.OrderedMap<swim.structure.Value,swim.structure.Value>
-
getIndex
- Specified by:
getIndexin interfaceswim.util.OrderedMap<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
- 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
- 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
- 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
-
remove
-
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
- 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
- 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
- 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() -
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
- 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>
-