StringMapImpl (Apache CXF JavaDoc 3.0.4.redhat-621177 API)

org.apache.cxf.message

## Class StringMapImpl

- java.lang.Object
- - java.util.AbstractMap<K,V>
  - - java.util.HashMap<String,Object>
    - - org.apache.cxf.message.StringMapImpl

- All Implemented Interfaces:
    Serializable, Cloneable, Map<String,Object>, StringMap
  Direct Known Subclasses:
    MessageImpl

      public class StringMapImpl
      extends HashMap<String,Object>
      implements StringMap

  A variation on HashMap which allows lookup by Class, via the string returned by `Class.getName()`.
  See Also:
    Serialized Form

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class java.util.AbstractMap

      `AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>`

    - ### Nested classes/interfaces inherited from interface java.util.Map

      `Map.Entry<K,V>`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `StringMapImpl()`
    `StringMapImpl(Map<String,Object> i)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `<T> T` | `get(Class<T> key)` Convenience method for storing/retrieving typed objects from the map.
    `<T> void` | `put(Class<T> key, T value)` Convenience method for storing/retrieving typed objects from the map.

    - ### Methods inherited from class java.util.HashMap

      `clear, clone, containsKey, containsValue, entrySet, get, isEmpty, keySet, put, putAll, remove, 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

      `clear, containsKey, containsValue, entrySet, equals, get, hashCode, isEmpty, keySet, put, putAll, remove, size, values`

- - ### Constructor Detail

    - #### StringMapImpl

          public StringMapImpl()

    - #### StringMapImpl

          public StringMapImpl(Map<String,Object> i)

  - ### Method Detail

    - #### get

          public <T> T get(Class<T> key)

      Description copied from interface: `StringMap`
      Convenience method for storing/retrieving typed objects from the map. equivalent to: (T)get(key.getName());
      Specified by:
        `get` in interface `StringMap`
      Parameters:
        `key` - the key
      Returns:
        the value

    - #### put

          public <T> void put(Class<T> key,
                     T value)

      Description copied from interface: `StringMap`
      Convenience method for storing/retrieving typed objects from the map. equivalent to: put(key.getName(), value);
      Specified by:
        `put` in interface `StringMap`
      Parameters:
        `key` - the key
        `value` - the value

Apache CXF