Module swim.store
Package swim.store

Class 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
    • 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)  
    • Constructor Detail

      • MapDataView

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

      • 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>
      • 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