Class Configuration.StrictMap<V>

  • All Implemented Interfaces:
    java.io.Serializable, java.util.concurrent.ConcurrentMap<java.lang.String,​V>, java.util.Map<java.lang.String,​V>
    Enclosing class:
    Configuration

    protected static class Configuration.StrictMap<V>
    extends java.util.concurrent.ConcurrentHashMap<java.lang.String,​V>
    See Also:
    Serialized Form
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      protected static class  Configuration.StrictMap.Ambiguity  
      • Nested classes/interfaces inherited from class java.util.concurrent.ConcurrentHashMap

        java.util.concurrent.ConcurrentHashMap.KeySetView<K extends java.lang.Object,​V extends java.lang.Object>
      • Nested classes/interfaces inherited from class java.util.AbstractMap

        java.util.AbstractMap.SimpleEntry<K extends java.lang.Object,​V extends java.lang.Object>, java.util.AbstractMap.SimpleImmutableEntry<K extends java.lang.Object,​V extends java.lang.Object>
      • Nested classes/interfaces inherited from interface java.util.Map

        java.util.Map.Entry<K extends java.lang.Object,​V extends java.lang.Object>
    • Constructor Summary

      Constructors 
      Constructor Description
      StrictMap​(java.lang.String name)  
      StrictMap​(java.lang.String name, int initialCapacity)  
      StrictMap​(java.lang.String name, int initialCapacity, float loadFactor)  
      StrictMap​(java.lang.String name, java.util.Map<java.lang.String,​? extends V> m)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      Configuration.StrictMap<V> conflictMessageProducer​(java.util.function.BiFunction<V,​V,​java.lang.String> conflictMessageProducer)
      Assign a function for producing a conflict error message when contains value with the same key.
      boolean containsKey​(java.lang.Object key)  
      V get​(java.lang.Object key)  
      private java.lang.String getShortName​(java.lang.String key)  
      V put​(java.lang.String key, V value)  
      • Methods inherited from class java.util.concurrent.ConcurrentHashMap

        clear, compute, computeIfAbsent, computeIfPresent, contains, containsValue, elements, entrySet, equals, forEach, forEach, forEach, forEachEntry, forEachEntry, forEachKey, forEachKey, forEachValue, forEachValue, getOrDefault, hashCode, isEmpty, keys, keySet, keySet, mappingCount, merge, newKeySet, newKeySet, putAll, putIfAbsent, reduce, reduceEntries, reduceEntries, reduceEntriesToDouble, reduceEntriesToInt, reduceEntriesToLong, reduceKeys, reduceKeys, reduceKeysToDouble, reduceKeysToInt, reduceKeysToLong, reduceToDouble, reduceToInt, reduceToLong, reduceValues, reduceValues, reduceValuesToDouble, reduceValuesToInt, reduceValuesToLong, remove, remove, replace, replace, replaceAll, search, searchEntries, searchKeys, searchValues, size, toString, values
      • Methods inherited from class java.util.AbstractMap

        clone
      • Methods inherited from class java.lang.Object

        finalize, getClass, notify, notifyAll, wait, wait, wait
    • Field Detail

      • name

        private final java.lang.String name
      • conflictMessageProducer

        private java.util.function.BiFunction<V,​V,​java.lang.String> conflictMessageProducer
    • Constructor Detail

      • StrictMap

        public StrictMap​(java.lang.String name,
                         int initialCapacity,
                         float loadFactor)
      • StrictMap

        public StrictMap​(java.lang.String name,
                         int initialCapacity)
      • StrictMap

        public StrictMap​(java.lang.String name)
      • StrictMap

        public StrictMap​(java.lang.String name,
                         java.util.Map<java.lang.String,​? extends V> m)
    • Method Detail

      • conflictMessageProducer

        public Configuration.StrictMap<V> conflictMessageProducer​(java.util.function.BiFunction<V,​V,​java.lang.String> conflictMessageProducer)
        Assign a function for producing a conflict error message when contains value with the same key.

        function arguments are 1st is saved value and 2nd is target value.

        Parameters:
        conflictMessageProducer - A function for producing a conflict error message
        Returns:
        a conflict error message
        Since:
        3.5.0
      • put

        public V put​(java.lang.String key,
                     V value)
        Specified by:
        put in interface java.util.Map<java.lang.String,​V>
        Overrides:
        put in class java.util.concurrent.ConcurrentHashMap<java.lang.String,​V>
      • containsKey

        public boolean containsKey​(java.lang.Object key)
        Specified by:
        containsKey in interface java.util.Map<java.lang.String,​V>
        Overrides:
        containsKey in class java.util.concurrent.ConcurrentHashMap<java.lang.String,​V>
      • get

        public V get​(java.lang.Object key)
        Specified by:
        get in interface java.util.Map<java.lang.String,​V>
        Overrides:
        get in class java.util.concurrent.ConcurrentHashMap<java.lang.String,​V>
      • getShortName

        private java.lang.String getShortName​(java.lang.String key)