Module swim.store
Package swim.store

Class MapDataView<K,V>

java.lang.Object
swim.structure.collections.ValueMap<K,V>
swim.structure.collections.ValueIterableMap<K,V>
swim.structure.collections.ValueOrderedMap<K,V>
swim.store.MapDataView<K,V>
All Implemented Interfaces:
Iterable<Map.Entry<K,V>>, Map<K,V>, SortedMap<K,V>, swim.api.data.MapData<K,V>, DataContext, MapDataContext, swim.util.IterableMap<K,V>, swim.util.OrderedMap<K,V>

public class MapDataView<K,V> extends swim.structure.collections.ValueOrderedMap<K,V> implements swim.api.data.MapData<K,V>, MapDataContext
  • Nested Class Summary

    Nested classes/interfaces inherited from interface java.util.Map

    Map.Entry<K extends Object,V extends Object>
  • Field Summary

    Fields inherited from class swim.structure.collections.ValueMap

    inner, keyForm, valueForm
  • Constructor Summary

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

    Modifier and Type
    Method
    Description
    void
     
     
    void
     
    void
     
    void
     
    void
    didDrop(long lower)
     
    void
    didRemove(swim.structure.Value key, swim.structure.Value oldValue)
     
    void
    didTake(long upper)
     
    void
    didUpdate(swim.structure.Value key, swim.structure.Value newValue, swim.structure.Value oldValue)
     
    void
    drop(int lower)
     
    getIndex(int index)
     
    boolean
     
    isResident(boolean isResident)
     
    boolean
     
    isTransient(boolean isTransient)
     
    <K2> MapDataView<K2,V>
    keyClass(Class<K2> keyClass)
     
    <K2> MapDataView<K2,V>
    keyForm(swim.structure.Form<K2> keyForm)
     
    swim.structure.Value
     
    swim.util.OrderedMap<K,V>
     
    void
    take(int upper)
     
    <V2> MapDataView<K,V2>
    valueClass(Class<V2> valueClass)
     
    <V2> MapDataView<K,V2>
    valueForm(swim.structure.Form<V2> valueForm)
     

    Methods inherited from class swim.structure.collections.ValueOrderedMap

    comparator, firstEntry, firstKey, firstValue, getEntry, headMap, indexOf, inner, iterator, lastEntry, lastKey, lastValue, nextEntry, nextKey, nextValue, previousEntry, previousKey, previousValue, subMap, tailMap

    Methods inherited from class swim.structure.collections.ValueIterableMap

    keyIterator, valueIterator

    Methods inherited from class swim.structure.collections.ValueMap

    clear, containsKey, containsValue, entrySet, equals, get, hashCode, isEmpty, keyForm, keySet, put, putAll, remove, size, toString, valueForm, values

    Methods inherited from class java.lang.Object

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

    Methods inherited from interface java.lang.Iterable

    forEach, spliterator

    Methods inherited from interface swim.api.data.MapData

    keyForm, valueForm

    Methods inherited from interface swim.util.OrderedMap

    clear, comparator, containsKey, containsValue, entrySet, firstEntry, firstKey, firstValue, get, getEntry, headMap, indexOf, isEmpty, iterator, keyIterator, keySet, lastEntry, lastKey, lastValue, nextEntry, nextKey, nextValue, previousEntry, previousKey, previousValue, put, putAll, remove, size, subMap, tailMap, valueIterator, values
  • Constructor Details

    • MapDataView

      public MapDataView(MapDataBinding dataBinding, swim.structure.Form<K> keyForm, swim.structure.Form<V> valueForm)
  • Method Details

    • dataBinding

      public MapDataBinding dataBinding()
    • name

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

      public <K2> MapDataView<K2,V> keyForm(swim.structure.Form<K2> keyForm)
      Specified by:
      keyForm in interface swim.api.data.MapData<K,V>
      Overrides:
      keyForm in class swim.structure.collections.ValueOrderedMap<K,V>
    • keyClass

      public <K2> MapDataView<K2,V> keyClass(Class<K2> keyClass)
      Specified by:
      keyClass in interface swim.api.data.MapData<K,V>
      Overrides:
      keyClass in class swim.structure.collections.ValueOrderedMap<K,V>
    • valueForm

      public <V2> MapDataView<K,V2> valueForm(swim.structure.Form<V2> valueForm)
      Specified by:
      valueForm in interface swim.api.data.MapData<K,V>
      Overrides:
      valueForm in class swim.structure.collections.ValueOrderedMap<K,V>
    • valueClass

      public <V2> MapDataView<K,V2> valueClass(Class<V2> valueClass)
      Specified by:
      valueClass in interface swim.api.data.MapData<K,V>
      Overrides:
      valueClass in class swim.structure.collections.ValueOrderedMap<K,V>
    • isResident

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

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

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

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

      public Map.Entry<K,V> getIndex(int index)
      Specified by:
      getIndex in interface swim.util.OrderedMap<K,V>
      Overrides:
      getIndex in class swim.structure.collections.ValueOrderedMap<K,V>
    • drop

      public void drop(int lower)
      Specified by:
      drop in interface swim.api.data.MapData<K,V>
    • take

      public void take(int upper)
      Specified by:
      take in interface swim.api.data.MapData<K,V>
    • snapshot

      public swim.util.OrderedMap<K,V> snapshot()
      Specified by:
      snapshot in interface swim.api.data.MapData<K,V>
    • close

      public void close()
      Specified by:
      close in interface swim.api.data.MapData<K,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, swim.structure.Value newValue, swim.structure.Value oldValue)
      Specified by:
      didUpdate in interface MapDataContext
    • didRemove

      public void didRemove(swim.structure.Value key, swim.structure.Value oldValue)
      Specified by:
      didRemove in interface MapDataContext
    • didDrop

      public void didDrop(long lower)
      Specified by:
      didDrop in interface MapDataContext
    • didTake

      public void didTake(long upper)
      Specified by:
      didTake in interface MapDataContext
    • didClear

      public void didClear()
      Specified by:
      didClear in interface MapDataContext