Package org.apache.ibatis.session
Class Configuration.StrictMap<V>
- java.lang.Object
-
- java.util.AbstractMap<K,V>
-
- java.util.concurrent.ConcurrentHashMap<java.lang.String,V>
-
- org.apache.ibatis.session.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 classConfiguration.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>
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.function.BiFunction<V,V,java.lang.String>conflictMessageProducerprivate java.lang.Stringnameprivate static longserialVersionUID
-
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.booleancontainsKey(java.lang.Object key)Vget(java.lang.Object key)private java.lang.StringgetShortName(java.lang.String key)Vput(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
-
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
name
private final java.lang.String name
-
-
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
-
containsKey
public boolean containsKey(java.lang.Object key)
-
get
public V get(java.lang.Object key)
-
getShortName
private java.lang.String getShortName(java.lang.String key)
-
-