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:
java.io.Serializable
,java.lang.Cloneable
,java.util.Map<K,V>
public final class NamedMap<K,V> extends java.util.HashMap<K,V>
Extension to HashMap to give the map an event type name. This class is not serializable.- Since:
- 10.1
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description NamedMap()
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.NamedMap(java.lang.String name)
Construct an empty Map with the supplied event type name.NamedMap(java.lang.String name, int initialCapacity)
Construct a map with the supplied name and initial capacity.NamedMap(java.lang.String name, int initialCapacity, float loadFactor)
Construct a map with the supplied name, initial capacity and load factor.NamedMap(java.lang.String name, java.util.Map<? extends K,? extends V> map)
Construct a map from the supplied name and underlying Map.NamedMap(java.util.Map<? extends K,? extends V> map)
Construct a map from the supplied name and null name.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clear()
Clear the map and name.java.lang.Object
clone()
boolean
equals(java.lang.Object o)
java.lang.String
getName()
Get the event type name of the map.int
hashCode()
void
setName(java.lang.String name)
Set the event type name of the Map.java.lang.String
toString()
-
-
-
Constructor Detail
-
NamedMap
public NamedMap(java.lang.String name)
Construct an empty Map with the supplied event type name.- Parameters:
name
- the event type name associated with this map.
-
NamedMap
public NamedMap(java.lang.String name, int initialCapacity)
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
public NamedMap(java.lang.String name, int initialCapacity, float loadFactor)
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
public NamedMap(java.lang.String name, java.util.Map<? extends K,? extends V> map)
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
-
-
Method Detail
-
setName
public void setName(java.lang.String name)
Set the event type name of the Map.- Parameters:
name
-
-
getName
public java.lang.String getName()
Get the event type name of the map. Can return null.- Returns:
- event type name of the map
-
hashCode
public int hashCode()
-
toString
public java.lang.String toString()
-
equals
public boolean equals(java.lang.Object o)
-
clear
public void clear()
Clear the map and name.
-
-