Package com.softwareag.connectivity
Class NamedMap<K,V>
java.lang.Object
java.util.AbstractMap<K,V>
java.util.HashMap<K,V>
com.softwareag.connectivity.NamedMap<K,V>
- Type Parameters:
K
-V
-
- All Implemented Interfaces:
Serializable
,Cloneable
,Map<K,
V>
Extension to HashMap to give the map an event type name.
This class is not serializable.
- Since:
- 10.1
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K extends Object,
V extends Object>, AbstractMap.SimpleImmutableEntry<K extends Object, V extends Object> -
Constructor Summary
ConstructorsConstructorDescriptionNamedMap()
Construct an empty Map with a null name.NamedMap
(int initialCapacity) Construct a map with the supplied initial capacity and null name.NamedMap
(int initialCapacity, float loadFactor) Construct a map with the supplied initial capacity and load factor and null name.Construct an empty Map with the supplied event type name.Construct a map with the supplied name and initial capacity.Construct a map with the supplied name, initial capacity and load factor.Construct a map from the supplied name and underlying Map.Construct a map from the supplied name and null name. -
Method Summary
Methods inherited from class java.util.HashMap
compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, forEach, get, getOrDefault, isEmpty, keySet, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, values
-
Constructor Details
-
NamedMap
Construct an empty Map with the supplied event type name.- Parameters:
name
- the event type name associated with this map.
-
NamedMap
Construct a map with the supplied name and initial capacity.- Parameters:
name
- the event type name associated with this map.initialCapacity
- the initial capacity.
-
NamedMap
Construct a map with the supplied name, initial capacity and load factor.- Parameters:
name
- the event type name associated with this map.initialCapacity
- the initial capacity.loadFactor
- the load factor
-
NamedMap
Construct a map from the supplied name and underlying Map.- Parameters:
name
- the event type name associated with this map.map
- the map whose mappings are to be placed in this map
-
NamedMap
public NamedMap()Construct an empty Map with a null name. -
NamedMap
public NamedMap(int initialCapacity) Construct a map with the supplied initial capacity and null name.- Parameters:
initialCapacity
- the initial capacity.
-
NamedMap
public NamedMap(int initialCapacity, float loadFactor) Construct a map with the supplied initial capacity and load factor and null name.- Parameters:
initialCapacity
- the initial capacity.loadFactor
- the load factor
-
NamedMap
Construct a map from the supplied name and null name.- Parameters:
map
- the map whose mappings are to be placed in this map
-
-
Method Details
-
setName
Set the event type name of the Map.- Parameters:
name
-
-
getName
Get the event type name of the map. Can return null.- Returns:
- event type name of the map
-
hashCode
public int hashCode() -
toString
- Overrides:
toString
in classAbstractMap<K,
V>
-
equals
-
clear
public void clear()Clear the map and name. -
clone
-