Class FixedSizeMap<K,V>

java.lang.Object
java.util.AbstractMap<K,V>
org.meeuw.configuration.FixedSizeMap<K,V>
All Implemented Interfaces:
Map<K,V>

public class FixedSizeMap<K,V> extends AbstractMap<K,V>
A simple Map implementation which allows for changing mappings, but not adding or deleting them.

This is used when representing configurations.

Since:
0.4
Author:
Michiel Meeuwissen
  • Constructor Details

    • FixedSizeMap

      public FixedSizeMap(Map<K,V> wrapped)
      Instantiate this map with a given map of keys and values. This will be wrapped, and FixedSizeMap will disallow putting keys which are not already in it (or removing keys from it)
    • FixedSizeMap

      @SafeVarargs public FixedSizeMap(K... keys)
      Instantiate this map with the needed keys. All values will initially be null
  • Method Details