Module swim.store
Package swim.store

Class SpatialDataView<K,S,V>

java.lang.Object
swim.spatial.SpatialValueMap<K,S,V>
swim.store.SpatialDataView<K,S,V>
All Implemented Interfaces:
Iterable<swim.spatial.SpatialMap.Entry<K,S,V>>, swim.api.data.SpatialData<K,S,V>, swim.spatial.SpatialMap<K,S,V>, DataContext, SpatialDataContext<S>

public class SpatialDataView<K,S,V> extends swim.spatial.SpatialValueMap<K,S,V> implements swim.api.data.SpatialData<K,S,V>, SpatialDataContext<S>
  • Nested Class Summary

    Nested classes/interfaces inherited from interface swim.spatial.SpatialMap

    swim.spatial.SpatialMap.Entry<K extends Object,S extends Object,V extends Object>, swim.spatial.SpatialMap.SimpleEntry<K extends Object,S extends Object,V extends Object>
  • Field Summary

    Fields inherited from class swim.spatial.SpatialValueMap

    inner, keyForm, valueForm
  • Constructor Summary

    Constructors
    Constructor
    Description
    SpatialDataView(SpatialDataBinding<S> dataBinding, swim.structure.Form<K> keyForm, swim.structure.Form<V> valueForm)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
     
     
    void
     
    void
     
    void
     
    void
    didMove(swim.structure.Value key, long newX, long newY, swim.structure.Value newValue, long oldX, long oldY, swim.structure.Value oldValue)
     
    void
    didRemove(swim.structure.Value key, long x, long y, swim.structure.Value oldValue)
     
    void
    didUpdate(swim.structure.Value key, long x, long y, swim.structure.Value newValue, swim.structure.Value oldValue)
     
    boolean
     
    isResident(boolean isResident)
     
    boolean
     
    isTransient(boolean isTransient)
     
    <K2> SpatialDataView<K2,S,V>
    keyClass(Class<K2> keyClass)
     
    <K2> SpatialDataView<K2,S,V>
    keyForm(swim.structure.Form<K2> keyForm)
     
    swim.structure.Value
     
    swim.math.Z2Form<S>
     
    swim.spatial.SpatialMap<K,S,V>
     
    <V2> SpatialDataView<K,S,V2>
    valueClass(Class<V2> valueClass)
     
    <V2> SpatialDataView<K,S,V2>
    valueForm(swim.structure.Form<V2> valueForm)
     

    Methods inherited from class swim.spatial.SpatialValueMap

    clear, containsKey, containsKey, containsValue, equals, get, get, hashCode, inner, isEmpty, iterator, iterator, keyForm, keyIterator, move, put, remove, size, toString, valueForm, valueIterator

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait

    Methods inherited from interface java.lang.Iterable

    forEach, iterator, spliterator

    Methods inherited from interface swim.api.data.SpatialData

    keyForm, valueForm

    Methods inherited from interface swim.spatial.SpatialMap

    clear, containsKey, containsKey, containsValue, get, get, isEmpty, iterator, keyIterator, move, put, remove, size, valueIterator
  • Constructor Details

    • SpatialDataView

      public SpatialDataView(SpatialDataBinding<S> dataBinding, swim.structure.Form<K> keyForm, swim.structure.Form<V> valueForm)
  • Method Details

    • dataBinding

      public SpatialDataBinding<S> dataBinding()
    • name

      public swim.structure.Value name()
      Specified by:
      name in interface swim.api.data.SpatialData<K,S,V>
    • keyForm

      public <K2> SpatialDataView<K2,S,V> keyForm(swim.structure.Form<K2> keyForm)
      Specified by:
      keyForm in interface swim.api.data.SpatialData<K,S,V>
      Overrides:
      keyForm in class swim.spatial.SpatialValueMap<K,S,V>
    • keyClass

      public <K2> SpatialDataView<K2,S,V> keyClass(Class<K2> keyClass)
      Specified by:
      keyClass in interface swim.api.data.SpatialData<K,S,V>
      Overrides:
      keyClass in class swim.spatial.SpatialValueMap<K,S,V>
    • shapeForm

      public swim.math.Z2Form<S> shapeForm()
      Specified by:
      shapeForm in interface swim.api.data.SpatialData<K,S,V>
    • valueForm

      public <V2> SpatialDataView<K,S,V2> valueForm(swim.structure.Form<V2> valueForm)
      Specified by:
      valueForm in interface swim.api.data.SpatialData<K,S,V>
      Overrides:
      valueForm in class swim.spatial.SpatialValueMap<K,S,V>
    • valueClass

      public <V2> SpatialDataView<K,S,V2> valueClass(Class<V2> valueClass)
      Specified by:
      valueClass in interface swim.api.data.SpatialData<K,S,V>
      Overrides:
      valueClass in class swim.spatial.SpatialValueMap<K,S,V>
    • isResident

      public boolean isResident()
      Specified by:
      isResident in interface swim.api.data.SpatialData<K,S,V>
    • isResident

      public SpatialDataView<K,S,V> isResident(boolean isResident)
      Specified by:
      isResident in interface swim.api.data.SpatialData<K,S,V>
    • isTransient

      public boolean isTransient()
      Specified by:
      isTransient in interface swim.api.data.SpatialData<K,S,V>
    • isTransient

      public SpatialDataView<K,S,V> isTransient(boolean isTransient)
      Specified by:
      isTransient in interface swim.api.data.SpatialData<K,S,V>
    • snapshot

      public swim.spatial.SpatialMap<K,S,V> snapshot()
      Specified by:
      snapshot in interface swim.api.data.SpatialData<K,S,V>
    • close

      public void close()
      Specified by:
      close in interface swim.api.data.SpatialData<K,S,V>
    • didChange

      public void didChange()
      Specified by:
      didChange in interface DataContext
    • didCommit

      public void didCommit()
      Specified by:
      didCommit in interface DataContext
    • didUpdate

      public void didUpdate(swim.structure.Value key, long x, long y, swim.structure.Value newValue, swim.structure.Value oldValue)
      Specified by:
      didUpdate in interface SpatialDataContext<K>
    • didMove

      public void didMove(swim.structure.Value key, long newX, long newY, swim.structure.Value newValue, long oldX, long oldY, swim.structure.Value oldValue)
      Specified by:
      didMove in interface SpatialDataContext<K>
    • didRemove

      public void didRemove(swim.structure.Value key, long x, long y, swim.structure.Value oldValue)
      Specified by:
      didRemove in interface SpatialDataContext<K>
    • didClear

      public void didClear()
      Specified by:
      didClear in interface SpatialDataContext<K>