Class SharedKeysMap<K,V>

java.lang.Object
java.util.AbstractMap<K,V>
org.jhotdraw8.fxcollection.sharedkeys.SharedKeysMap<K,V>
Type Parameters:
K - key type
V - value type
All Implemented Interfaces:
Map<K,V>, javafx.beans.Observable, javafx.collections.ObservableMap<K,V>

public class SharedKeysMap<K,V> extends AbstractMap<K,V> implements javafx.collections.ObservableMap<K,V>
An observable map which stores its values in an array, and which shares its immutable keys with other SharedKeysMap instances.
Author:
Werner Randelshofer
  • Constructor Details

    • SharedKeysMap

      public SharedKeysMap(@NonNull Map<K,Integer> keyMap)
      Creates a new instance.
      Parameters:
      keyMap - a map which maps from keys to indices. The indices must be in the range [0,keyMap.size()-1].

      This map must be immutable.

  • Method Details