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>

public final class NamedMap<K,V> extends HashMap<K,V>
Extension to HashMap to give the map an event type name. This class is not serializable.
Since:
10.1
See Also:
  • Constructor Details

    • NamedMap

      public NamedMap(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(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(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(String name, 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
    • NamedMap

      public NamedMap(Map<? extends K,? extends V> map)
      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

      public void setName(String name)
      Set the event type name of the Map.
      Parameters:
      name -
    • getName

      public String getName()
      Get the event type name of the map. Can return null.
      Returns:
      event type name of the map
    • hashCode

      public int hashCode()
      Specified by:
      hashCode in interface Map<K,V>
      Overrides:
      hashCode in class AbstractMap<K,V>
    • toString

      public String toString()
      Overrides:
      toString in class AbstractMap<K,V>
    • equals

      public boolean equals(Object o)
      Specified by:
      equals in interface Map<K,V>
      Overrides:
      equals in class AbstractMap<K,V>
    • clear

      public void clear()
      Clear the map and name.
      Specified by:
      clear in interface Map<K,V>
      Overrides:
      clear in class HashMap<K,V>
    • clone

      public Object clone()
      Overrides:
      clone in class HashMap<K,V>