| java.lang.Object com.sun.xml.bind.v2.util.QNameMap
QNameMap | final public class QNameMap (Code) | | Map keyed by
QName .
This specialized map allows a look up operation without constructing
a new QName instance, for a performance reason. This
Map assumes
that both namespace URI and local name are
String.intern intern ed.
since: JAXB 2.0 |
Inner Class :final public static class Entry | |
Field Summary | |
transient int | size The number of key-value mappings contained in this identity hash map. | transient Entry<V>[] | table The table, resized as necessary. |
Method Summary | |
public boolean | containsKey(String nsUri, String localName) | public Set<Entry<V>> | entrySet() | public V | get(String nsUri, String localPart) Returns the value to which the specified keys are mapped in this QNameMap,
or null if the map contains no mapping for this key.
Parameters: nsUri - the namespaceUri key whose associated value is to be returned. Parameters: localPart - the localPart key whose associated value is to be returned. | public V | get(QName name) | public Entry<V> | getOne() Returns one random item in the map. | public boolean | isEmpty() Returns true if this map is empty. | public Collection<QName> | keySet() | public void | put(String namespaceUri, String localname, V value) Associates the specified value with the specified keys in this map. | public void | put(QName name, V value) | public void | put(Name name, V value) | public QNameMap<V> | putAll(QNameMap<? extends V> map) 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 int | size() Returns the number of keys-value mappings in this map. | public String | toString() |
size | transient int size(Code) | | The number of key-value mappings contained in this identity hash map.
|
table | transient Entry<V>[] table(Code) | | The table, resized as necessary. Length MUST Always be a power of two.
|
QNameMap | public QNameMap()(Code) | | |
entrySet | public Set<Entry<V>> entrySet()(Code) | | |
get | public V get(String nsUri, String localPart)(Code) | | Returns the value to which the specified keys are mapped in this QNameMap,
or null if the map contains no mapping for this key.
Parameters: nsUri - the namespaceUri key whose associated value is to be returned. Parameters: localPart - the localPart key whose associated value is to be returned. the value to which this map maps the specified set of keya, ornull if the map contains no mapping for this set of keys. See Also: QNameMap.put(String,String,Object) |
getOne | public Entry<V> getOne()(Code) | | Returns one random item in the map.
If this map is empty, return null.
This method is useful to obtain the value from a map that only contains one element.
|
isEmpty | public boolean isEmpty()(Code) | | Returns true if this map is empty.
|
put | public void put(String namespaceUri, String localname, V value)(Code) | | Associates the specified value with the specified keys in this map.
If the map previously contained a mapping for this key, the old
value is replaced.
Parameters: namespaceUri - First key with which the specified value is to be associated. Parameters: localname - Second key with which the specified value is to be associated. Parameters: value - value to be associated with the specified key. |
putAll | public QNameMap<V> putAll(QNameMap<? extends V> map)(Code) | | 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.
Parameters: map - mappings to be stored in this map. |
size | public int size()(Code) | | Returns the number of keys-value mappings in this map.
the number of keys-value mappings in this map. |
|
|