- java.lang.Object
-
- swim.store.MapDataProxy
-
- All Implemented Interfaces:
Iterable<Map.Entry<Value,Value>>
,Map<Value,Value>
,SortedMap<Value,Value>
,MapData<Value,Value>
,DataBinding
,DataContext
,MapDataBinding
,MapDataContext
,IterableMap<Value,Value>
,OrderedMap<Value,Value>
public class MapDataProxy extends Object implements MapDataBinding, MapDataContext
-
-
Field Summary
Fields Modifier and Type Field Description protected MapDataBinding
dataBinding
protected MapDataContext
dataContext
-
Constructor Summary
Constructors Constructor Description MapDataProxy(MapDataBinding dataBinding)
-
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
-
dataBinding
protected final MapDataBinding dataBinding
-
dataContext
protected MapDataContext dataContext
-
-
Constructor Detail
-
MapDataProxy
public MapDataProxy(MapDataBinding dataBinding)
-
-
Method Detail
-
dataBinding
public final MapDataBinding dataBinding()
-
dataContext
public final 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 Value name()
-
dataSize
public long dataSize()
- Specified by:
dataSize
in interfaceDataBinding
-
valueClass
public <V> MapData<Value,V> valueClass(Class<V> valueClass)
- Specified by:
valueClass
in interfaceMapData<Value,Value>
-
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>
-
close
public void close()
-
didChange
public void didChange()
- Specified by:
didChange
in interfaceDataContext
-
didCommit
public void didCommit()
- Specified by:
didCommit
in interfaceDataContext
-
didUpdate
public void didUpdate(Value key, Value newValue, Value oldValue)
- Specified by:
didUpdate
in interfaceMapDataContext
-
didRemove
public void didRemove(Value key, Value oldValue)
- Specified by:
didRemove
in interfaceMapDataContext
-
didDrop
public void didDrop(long lower)
- Specified by:
didDrop
in interfaceMapDataContext
-
didTake
public void didTake(long upper)
- Specified by:
didTake
in interfaceMapDataContext
-
didClear
public void didClear()
- Specified by:
didClear
in interfaceMapDataContext
-
-