Class Configuration.StrictMap<V>

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

    protected static class Configuration.StrictMap<V>
    extends java.util.HashMap<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.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.
      V get​(java.lang.Object key)  
      V put​(java.lang.String key, V value)  
      • Methods inherited from class java.util.HashMap

        clear, clone, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, forEach, getOrDefault, isEmpty, keySet, merge, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, values
      • Methods inherited from class java.util.AbstractMap

        equals, hashCode, toString
      • Methods inherited from class java.lang.Object

        finalize, getClass, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface java.util.Map

        equals, hashCode
    • 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.HashMap<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.HashMap<java.lang.String,​V>