public class NamespaceAwareHashMap
extends HashMap
Attribute map that resolves namespace-prefixed keys into QName-style names on demand.
| Type Params | Return Type | Name and description |
|---|---|---|
|
public boolean |
containsKey(Object key)Returns true if this map contains a mapping for the
specified key.
|
|
public String |
get(Object key)Returns the value to which the specified key is mapped, or null if this map contains no mapping for the key.
More formally, if this map contains a mapping from a key
A return value of
|
|
public Map |
getNamespaceTagHints()Returns the prefix hints used for key normalization. |
|
public String |
put(String key, String value)Associates the specified value with the specified key in this map. If the map previously contained a mapping for the key, the old value is replaced.
|
|
public void |
putAll(Map<? extends String, ? extends String> m)Copies all of the mappings from the specified map to this map. These mappings will replace any mappings that this map had for any of the keys currently in the specified map.
|
|
public String |
remove(Object key)Removes the mapping for the specified key from this map if present.
|
|
public void |
setNamespaceTagHints(Map namespaceTagHints)Sets the prefix-to-namespace hints used to normalize prefixed keys. |
| Methods inherited from class | Name |
|---|---|
class HashMap |
clear, clone, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, equals, forEach, get, getClass, getOrDefault, hashCode, isEmpty, keySet, merge, notify, notifyAll, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, toString, values, wait, wait, wait |
Returns true if this map contains a mapping for the
specified key.
key - The key whose presence in this map is to be testedtrue if this map contains a mapping for the specified
key. Returns the value to which the specified key is mapped,
or null if this map contains no mapping for the key.
More formally, if this map contains a mapping from a key
k to a value v such that (key==null ? k==null :
key.equals(k)), then this method returns v; otherwise
it returns null. (There can be at most one such mapping.)
A return value of null does not necessarily
indicate that the map contains no mapping for the key; it's also
possible that the map explicitly maps the key to null.
The containsKey operation may be used to
distinguish these two cases.
Returns the prefix hints used for key normalization.
Associates the specified value with the specified key in this map. If the map previously contained a mapping for the key, the old value is replaced.
key - key with which the specified value is to be associatedvalue - value to be associated with the specified keykey, or
null if there was no mapping for key.
(A null return can also indicate that the map
previously associated null with key.)Copies all of the mappings from the specified map to this map. These mappings will replace any mappings that this map had for any of the keys currently in the specified map.
m - mappings to be stored in this mapRemoves the mapping for the specified key from this map if present.
key - key whose mapping is to be removed from the mapkey, or
null if there was no mapping for key.
(A null return can also indicate that the map
previously associated null with key.)Sets the prefix-to-namespace hints used to normalize prefixed keys.
namespaceTagHints - known namespace prefix mappings