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 interned.
| Modifier and Type | Class and Description |
|---|---|
| public static class | |
| private class | |
| private class | |
| private abstract class |
| Modifier and Type | Field and Description |
|---|---|
| private static final int | DEFAULT_INITIAL_CAPACITY
The default initial capacity - MUST be a power of two. |
| private static final float | DEFAULT_LOAD_FACTOR
The load factor used when none specified in constructor. |
| private Set | entrySet
Gives an entrySet view of this map |
| private static final int | MAXIMUM_CAPACITY
The maximum capacity, used if a higher value is implicitly specified by either of the constructors with arguments. |
| pack-priv transient int | size
The number of key-value mappings contained in this identity hash map. |
| pack-priv transient QNameMap. | table
The table, resized as necessary. |
| private int | threshold
The next size value at which to resize . |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| private void | |
| public boolean | |
| public Set | |
| public V | Returns: the value to which this map maps the specified set of keya, ornull if the map contains no mapping for this set of keys.the namespaceUri key whose associated value is to be returned. nsUri, String the localPart key whose associated value is to be returned. localPart)Returns the value to which the specified keys are mapped in this QNameMap,
or |
| public V | |
| private QNameMap. | |
| public QNameMap. | |
| private static int | |
| private static int | |
| public boolean | |
| public Collection | |
| private Iterator | |
| public void | |
| public void | |
| public void | |
| public QNameMap | |
| private void | |
| public int | Returns: the number of keys-value mappings in this map.Returns the number of keys-value mappings in this map. |
| public String | |
| private void |
| DEFAULT_INITIAL_CAPACITY | back to summary |
|---|---|
| private static final int DEFAULT_INITIAL_CAPACITY The default initial capacity - MUST be a power of two. | |
| DEFAULT_LOAD_FACTOR | back to summary |
|---|---|
| private static final float DEFAULT_LOAD_FACTOR The load factor used when none specified in constructor. | |
| entrySet | back to summary |
|---|---|
| private Set<QNameMap. Gives an entrySet view of this map | |
| MAXIMUM_CAPACITY | back to summary |
|---|---|
| private static final int MAXIMUM_CAPACITY The maximum capacity, used if a higher value is implicitly specified by either of the constructors with arguments. MUST be a power of two <= 1<<30. | |
| size | back to summary |
|---|---|
| pack-priv transient int size The number of key-value mappings contained in this identity hash map. | |
| table | back to summary |
|---|---|
| pack-priv transient QNameMap. The table, resized as necessary. Length MUST Always be a power of two. | |
| threshold | back to summary |
|---|---|
| private int threshold The next size value at which to resize . Taking it as MAXIMUM_CAPACITY | |
| QNameMap | back to summary |
|---|---|
| public QNameMap() | |
| addEntry | back to summary |
|---|---|
| private void addEntry(int hash, String nsUri, String localName, V value, int bucketIndex) Add a new entry with the specified keys, value and hash code to the specified bucket. It is the responsibility of this method to resize the table if appropriate. | |
| containsKey | back to summary |
|---|---|
| public boolean containsKey(String nsUri, String localName) | |
| entrySet | back to summary |
|---|---|
| public Set | |
| get | back to summary |
|---|---|
| public V get(String nsUri, String localPart) Returns the value to which the specified keys are mapped in this QNameMap,
or
| |
| get | back to summary |
|---|---|
| public V get(QName name) | |
| getEntry | back to summary |
|---|---|
| private QNameMap. | |
| getOne | back to summary |
|---|---|
| public QNameMap. 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. | |
| hash | back to summary |
|---|---|
| private static int hash(String x) Returns a hash value for the specified object.The hash value is computed for the localName. | |
| indexFor | back to summary |
|---|---|
| private static int indexFor(int h, int length) Returns index for hash code h. | |
| isEmpty | back to summary |
|---|---|
| public boolean isEmpty() Returns true if this map is empty. | |
| keySet | back to summary |
|---|---|
| public Collection | |
| newEntryIterator | back to summary |
|---|---|
| private Iterator | |
| put | back to summary |
|---|---|
| public void put(String namespaceUri, String localname, V value) 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. | |
| put | back to summary |
|---|---|
| public void put(QName name, V value) | |
| put | back to summary |
|---|---|
| public void put(Name name, V value) | |
| putAll | back to summary |
|---|---|
| public QNameMap 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.
| |
| resize | back to summary |
|---|---|
| private void resize(int newCapacity) Rehashes the contents of this map into a new array with a larger capacity. This method is called automatically when the number of keys in this map reaches its threshold. | |
| size | back to summary |
|---|---|
| public int size() Returns the number of keys-value mappings in this map.
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object.
Satisfying this method's contract implies a non-
| |
| transfer | back to summary |
|---|---|
| private void transfer(QNameMap. Transfer all entries from current table to newTable. | |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv final int | |
| public final String | localName
The localPart. |
| pack-priv QNameMap. | |
| public final String | nsUri
The namespace URI. |
| pack-priv V |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public QName | |
| public boolean | equals(Object o)
Overrides java. Indicates whether some other object is "equal to" this one. |
| public V | |
| public int | |
| public V | |
| public String |
| hash | back to summary |
|---|---|
| pack-priv final int hash | |
| localName | back to summary |
|---|---|
| public final String localName The localPart. | |
| next | back to summary |
|---|---|
| pack-priv QNameMap. | |
| nsUri | back to summary |
|---|---|
| public final String nsUri The namespace URI. | |
| value | back to summary |
|---|---|
| pack-priv V value | |
| Entry | back to summary |
|---|---|
| pack-priv Entry(int h, String nsUri, String localName, V v, QNameMap. Create new entry. | |
| createQName | back to summary |
|---|---|
| public QName createQName() | |
| equals | back to summary |
|---|---|
| public boolean equals(Object o) Overrides java. Doc from java. Indicates whether some other object is "equal to" this one.
The
An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes.
| |
| getValue | back to summary |
|---|---|
| public V getValue() | |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides java. Doc from java. Returns a hash code value for this object. This method is
supported for the benefit of hash tables such as those provided by
The general contract of
| |
| setValue | back to summary |
|---|---|
| public V setValue(V newValue) | |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object.
Satisfying this method's contract implies a non-
| |
| Access | Constructor and Description |
|---|---|
| private |
| EntryIterator | back to summary |
|---|---|
| private EntryIterator() | |
| next | back to summary |
|---|---|
| public QNameMap. Implements java. Doc from java. Returns the next element in the iteration.
| |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | contains(Object o)
Overrides java. Implements java. Returns |
| public Iterator | iterator()
Implements abstract java. Implements java. Returns an iterator over the elements in this set. |
| public boolean | remove(Object o)
Overrides java. Implements java. Removes the specified element from this set if it is present (optional operation). |
| public int | size()
Implements abstract java. Implements java. Returns the number of elements in this set (its cardinality). |
| EntrySet | back to summary |
|---|---|
| private EntrySet() | |
| contains | back to summary |
|---|---|
| public boolean contains(Object o) Overrides java. Implements java. Doc from java. Returns
| |
| iterator | back to summary |
|---|---|
| public Iterator Implements abstract java. Implements java. Doc from java. Returns an iterator over the elements in this set. The elements are returned in no particular order (unless this set is an instance of some class that provides a guarantee).
| |
| remove | back to summary |
|---|---|
| public boolean remove(Object o) Overrides java. Implements java. Doc from java. Removes the specified element from this set if it is present
(optional operation). More formally, removes an element
| |
| size | back to summary |
|---|---|
| public int size() Implements abstract java. Implements java. Doc from java. Returns the number of elements in this set (its cardinality). If this
set contains more than
| |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | |
| pack-priv QNameMap. | |
| public void | remove()
Overrides default java. Removes from the underlying collection the last element returned by this iterator (optional operation). |
| index | back to summary |
|---|---|
| pack-priv int index | |
| next | back to summary |
|---|---|
| pack-priv QNameMap. | |
| HashIterator | back to summary |
|---|---|
| pack-priv HashIterator() | |
| hasNext | back to summary |
|---|---|
| public boolean hasNext() Implements java. Doc from java. Returns
| |
| nextEntry | back to summary |
|---|---|
| pack-priv QNameMap. | |
| remove | back to summary |
|---|---|
| public void remove() Overrides default java. Doc from java. Removes from the underlying collection the last element returned
by this iterator (optional operation). This method can be called
only once per call to The behavior of an iterator is unspecified if the underlying collection is modified while the iteration is in progress in any way other than by calling this method, unless an overriding class has specified a concurrent modification policy.
The behavior of an iterator is unspecified if this method is called
after a call to the
| |