- java.lang.Object
-
- swim.store.mem.MapDataModel
-
- All Implemented Interfaces:
Iterable<Map.Entry<Value,Value>>
,Map<Value,Value>
,SortedMap<Value,Value>
,MapData<Value,Value>
,DataBinding
,MapDataBinding
,IterableMap<Value,Value>
,OrderedMap<Value,Value>
public class MapDataModel extends Object implements MapDataBinding
-
-
Field Summary
Fields Modifier and Type Field Description protected MapDataContext
dataContext
protected Value
name
protected StoreBinding
storeBinding
protected BTreeMap<Value,Value,Value>
tree
-
Method Summary
-
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
-
-
-
-
Field Detail
-
name
protected final Value name
-
dataContext
protected MapDataContext dataContext
-
storeBinding
protected StoreBinding storeBinding
-
-
Method Detail
-
dataContext
public MapDataContext dataContext()
- Specified by:
dataContext
in interfaceDataBinding
- Specified by:
dataContext
in interfaceMapDataBinding
-
setDataContext
public void setDataContext(MapDataContext dataContext)
- Specified by:
setDataContext
in interfaceMapDataBinding
-
storeBinding
public StoreBinding storeBinding()
- Specified by:
storeBinding
in interfaceDataBinding
-
setStoreBinding
public void setStoreBinding(StoreBinding storeBinding)
- Specified by:
setStoreBinding
in interfaceDataBinding
-
unwrapData
public <T> T unwrapData(Class<T> dataClass)
- Specified by:
unwrapData
in interfaceDataBinding
-
name
public final Value name()
-
valueClass
public <V2> MapData<Value,V2> valueClass(Class<V2> valueClass)
- Specified by:
valueClass
in interfaceMapData<Value,Value>
-
dataSize
public long dataSize()
- Specified by:
dataSize
in interfaceDataBinding
-
isResident
public boolean isResident()
- Specified by:
isResident
in interfaceDataBinding
- Specified by:
isResident
in interfaceMapData<Value,Value>
-
isResident
public MapDataBinding isResident(boolean isResident)
- Specified by:
isResident
in interfaceDataBinding
- Specified by:
isResident
in interfaceMapData<Value,Value>
- Specified by:
isResident
in interfaceMapDataBinding
-
isTransient
public boolean isTransient()
- Specified by:
isTransient
in interfaceDataBinding
- Specified by:
isTransient
in interfaceMapData<Value,Value>
-
isTransient
public MapDataBinding isTransient(boolean isTransient)
- Specified by:
isTransient
in interfaceDataBinding
- Specified by:
isTransient
in interfaceMapData<Value,Value>
- Specified by:
isTransient
in interfaceMapDataBinding
-
isEmpty
public boolean isEmpty()
-
size
public int size()
-
containsKey
public boolean containsKey(Object key)
- Specified by:
containsKey
in interfaceIterableMap<Value,Value>
- Specified by:
containsKey
in interfaceMap<Value,Value>
- Specified by:
containsKey
in interfaceOrderedMap<Value,Value>
-
containsValue
public boolean containsValue(Object value)
- Specified by:
containsValue
in interfaceIterableMap<Value,Value>
- Specified by:
containsValue
in interfaceMap<Value,Value>
- Specified by:
containsValue
in interfaceOrderedMap<Value,Value>
-
indexOf
public int indexOf(Object key)
- Specified by:
indexOf
in interfaceOrderedMap<Value,Value>
-
getEntry
public Map.Entry<Value,Value> getEntry(Object key)
- Specified by:
getEntry
in interfaceOrderedMap<Value,Value>
-
getIndex
public Map.Entry<Value,Value> getIndex(int index)
- Specified by:
getIndex
in interfaceOrderedMap<Value,Value>
-
firstEntry
public Map.Entry<Value,Value> firstEntry()
- Specified by:
firstEntry
in interfaceOrderedMap<Value,Value>
-
firstKey
public Value firstKey()
-
firstValue
public Value firstValue()
- Specified by:
firstValue
in interfaceOrderedMap<Value,Value>
-
lastEntry
public Map.Entry<Value,Value> lastEntry()
- Specified by:
lastEntry
in interfaceOrderedMap<Value,Value>
-
lastKey
public Value lastKey()
-
lastValue
public Value lastValue()
- Specified by:
lastValue
in interfaceOrderedMap<Value,Value>
-
nextEntry
public Map.Entry<Value,Value> nextEntry(Value key)
- Specified by:
nextEntry
in interfaceOrderedMap<Value,Value>
-
nextKey
public Value nextKey(Value key)
- Specified by:
nextKey
in interfaceOrderedMap<Value,Value>
-
nextValue
public Value nextValue(Value key)
- Specified by:
nextValue
in interfaceOrderedMap<Value,Value>
-
previousEntry
public Map.Entry<Value,Value> previousEntry(Value key)
- Specified by:
previousEntry
in interfaceOrderedMap<Value,Value>
-
previousKey
public Value previousKey(Value key)
- Specified by:
previousKey
in interfaceOrderedMap<Value,Value>
-
previousValue
public Value previousValue(Value key)
- Specified by:
previousValue
in interfaceOrderedMap<Value,Value>
-
clear
public void clear()
-
headMap
public OrderedMap<Value,Value> headMap(Value toKey)
-
tailMap
public OrderedMap<Value,Value> tailMap(Value fromKey)
-
subMap
public OrderedMap<Value,Value> subMap(Value fromKey, Value toKey)
-
values
public Collection<Value> values()
-
iterator
public OrderedMapCursor<Value,Value> iterator()
-
keyIterator
public Cursor<Value> keyIterator()
- Specified by:
keyIterator
in interfaceIterableMap<Value,Value>
- Specified by:
keyIterator
in interfaceOrderedMap<Value,Value>
-
valueIterator
public Cursor<Value> valueIterator()
- Specified by:
valueIterator
in interfaceIterableMap<Value,Value>
- Specified by:
valueIterator
in interfaceOrderedMap<Value,Value>
-
snapshot
public OrderedMap<Value,Value> snapshot()
-
comparator
public Comparator<? super Value> comparator()
- Specified by:
comparator
in interfaceOrderedMap<Value,Value>
- Specified by:
comparator
in interfaceSortedMap<Value,Value>
-
-