- java.lang.Object
-
- swim.store.mem.SpatialDataModel<S>
-
- All Implemented Interfaces:
Iterable<SpatialMap.Entry<Value,S,Value>>
,SpatialData<Value,S,Value>
,SpatialMap<Value,S,Value>
,DataBinding
,SpatialDataBinding<S>
public class SpatialDataModel<S> extends Object implements SpatialDataBinding<S>
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface swim.spatial.SpatialMap
SpatialMap.Entry<K,S,V>, SpatialMap.SimpleEntry<K,S,V>
-
-
Field Summary
Fields Modifier and Type Field Description protected SpatialDataContext<S>
dataContext
protected Value
name
protected StoreBinding
storeBinding
protected QTreeMap<Value,S,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
-
-
-
-
Field Detail
-
name
protected final Value name
-
dataContext
protected SpatialDataContext<S> dataContext
-
storeBinding
protected StoreBinding storeBinding
-
-
Method Detail
-
dataContext
public SpatialDataContext<S> dataContext()
- Specified by:
dataContext
in interfaceDataBinding
- Specified by:
dataContext
in interfaceSpatialDataBinding<S>
-
setDataContext
public void setDataContext(SpatialDataContext<S> dataContext)
- Specified by:
setDataContext
in interfaceSpatialDataBinding<S>
-
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()
- Specified by:
name
in interfaceDataBinding
- Specified by:
name
in interfaceSpatialData<Value,S,Value>
-
keyForm
public Form<Value> keyForm()
- Specified by:
keyForm
in interfaceSpatialData<Value,S,Value>
-
keyForm
public <K2> SpatialData<K2,S,Value> keyForm(Form<K2> keyForm)
- Specified by:
keyForm
in interfaceSpatialData<Value,S,Value>
-
keyClass
public <K2> SpatialData<K2,S,Value> keyClass(Class<K2> keyClass)
- Specified by:
keyClass
in interfaceSpatialData<Value,S,Value>
-
dataSize
public long dataSize()
- Specified by:
dataSize
in interfaceDataBinding
-
shapeForm
public final Z2Form<S> shapeForm()
- Specified by:
shapeForm
in interfaceSpatialData<Value,S,Value>
-
valueForm
public Form<Value> valueForm()
- Specified by:
valueForm
in interfaceSpatialData<Value,S,Value>
-
valueForm
public <V2> SpatialData<Value,S,V2> valueForm(Form<V2> valueForm)
- Specified by:
valueForm
in interfaceSpatialData<Value,S,Value>
-
valueClass
public <V2> SpatialData<Value,S,V2> valueClass(Class<V2> valueClass)
- Specified by:
valueClass
in interfaceSpatialData<Value,S,Value>
-
isResident
public boolean isResident()
- Specified by:
isResident
in interfaceDataBinding
- Specified by:
isResident
in interfaceSpatialData<Value,S,Value>
-
isResident
public SpatialDataBinding<S> isResident(boolean isResident)
- Specified by:
isResident
in interfaceDataBinding
- Specified by:
isResident
in interfaceSpatialData<Value,S,Value>
- Specified by:
isResident
in interfaceSpatialDataBinding<S>
-
isTransient
public boolean isTransient()
- Specified by:
isTransient
in interfaceDataBinding
- Specified by:
isTransient
in interfaceSpatialData<Value,S,Value>
-
isTransient
public SpatialDataBinding<S> isTransient(boolean isTransient)
- Specified by:
isTransient
in interfaceDataBinding
- Specified by:
isTransient
in interfaceSpatialData<Value,S,Value>
- Specified by:
isTransient
in interfaceSpatialDataBinding<S>
-
isEmpty
public boolean isEmpty()
- Specified by:
isEmpty
in interfaceSpatialMap<Value,S,Value>
-
size
public int size()
- Specified by:
size
in interfaceSpatialMap<Value,S,Value>
-
containsKey
public boolean containsKey(Value key, S shape)
- Specified by:
containsKey
in interfaceSpatialMap<Value,S,Value>
-
containsKey
public boolean containsKey(Object key)
- Specified by:
containsKey
in interfaceSpatialMap<Value,S,Value>
-
containsValue
public boolean containsValue(Object value)
- Specified by:
containsValue
in interfaceSpatialMap<Value,S,Value>
-
get
public Value get(Value key, S shape)
- Specified by:
get
in interfaceSpatialMap<Value,S,Value>
-
put
public Value put(Value key, S shape, Value newValue)
- Specified by:
put
in interfaceSpatialMap<Value,S,Value>
-
move
public Value move(Value key, S oldShape, S newShape, Value newValue)
- Specified by:
move
in interfaceSpatialMap<Value,S,Value>
-
remove
public Value remove(Value key, S shape)
- Specified by:
remove
in interfaceSpatialMap<Value,S,Value>
-
clear
public void clear()
- Specified by:
clear
in interfaceSpatialMap<Value,S,Value>
-
iterator
public Iterator<SpatialMap.Entry<Value,S,Value>> iterator(S shape)
- Specified by:
iterator
in interfaceSpatialMap<Value,S,Value>
-
iterator
public Iterator<SpatialMap.Entry<Value,S,Value>> iterator()
-
keyIterator
public Iterator<Value> keyIterator()
- Specified by:
keyIterator
in interfaceSpatialMap<Value,S,Value>
-
valueIterator
public Iterator<Value> valueIterator()
- Specified by:
valueIterator
in interfaceSpatialMap<Value,S,Value>
-
snapshot
public SpatialMap<Value,S,Value> snapshot()
- Specified by:
snapshot
in interfaceSpatialData<Value,S,Value>
-
close
public void close()
- Specified by:
close
in interfaceDataBinding
- Specified by:
close
in interfaceSpatialData<Value,S,Value>
-
-