| Modifier and Type | Class and Description |
|---|---|
| private static class | ExpandedNameTable.
Inner class which represents a hash table entry. |
| Modifier and Type | Field and Description |
|---|---|
| public static final int | |
| public static final int | |
| public static final int | |
| public static final int | |
| public static final int | |
| public static final int | |
| public static final int | |
| public static final int | |
| public static final int | |
| pack-priv ExtendedType | hashET
Workspace for lookup. |
| private int | m_capacity
The capacity of the hash table, i.e. the size of the internal HashEntry array. |
| private static ExtendedType[] | m_defaultExtendedTypes
The array to store the default extended types. |
| private ExtendedType[] | m_extendedTypes
Array of extended types for this document |
| private static int | m_initialCapacity
The initial capacity of the hash table. |
| private static int | m_initialSize
The initial size of the m_extendedTypes array |
| private static float | m_loadFactor
The default load factor of the Hashtable. |
| private int | m_nextType
Next available extended type |
| private ExpandedNameTable. | m_table
The internal array to store the hash entries. |
| private int | m_threshold
The threshold of the hash table, which is equal to capacity * loadFactor. |
| public static final int | |
| public static final int | |
| public static final int | |
| public static final int |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public int | Returns: the expanded-name id of the node.The namespace namespace, String The local name localName, int The node type type)Given an expanded name represented by namespace, local name and node type, return an ID. If the expanded-name does not exist in the internal tables, the entry will be created, and the ID will be returned. |
| public int | Returns: the expanded-name id of the node.The namespace namespace, String The local name localName, int The node type type, boolean If it is true, we will only search for the expanded name.
-1 is return is the name is not found. searchOnly)Given an expanded name represented by namespace, local name and node type, return an ID. If the expanded-name does not exist in the internal tables, the entry will be created, and the ID will be returned. |
| public int | Returns: the expanded-name id of the node.Given a type, return an expanded name ID.Any additional nodes that are created that have this expanded name will use this ID. |
| public ExtendedType[] | |
| public String | Returns: String Local name of this node, or null if the node has no name.an ID that represents an expanded-name. ExpandedNameID)Given an expanded-name ID, return the local name part. |
| public final int | Returns: The id of this local name.an ID that represents an expanded-name. ExpandedNameID)Given an expanded-name ID, return the local name ID. |
| public String | Returns: String URI value of this node's namespace, or null if no namespace was resolved.an ID that represents an expanded-name. ExpandedNameID)Given an expanded-name ID, return the namespace URI part. |
| public final int | Returns: The id of this namespace.an ID that represents an expanded-name. ExpandedNameID)Given an expanded-name ID, return the namespace URI ID. |
| public int | |
| public final short | Returns: The id of this local name.an ID that represents an expanded-name. ExpandedNameID)Given an expanded-name ID, return the local name ID. |
| private void | |
| private void | rehash()
Increases the capacity of and internally reorganizes the hashtable, in order to accommodate and access its entries more efficiently. |
| ATTRIBUTE | back to summary |
|---|---|
| public static final int ATTRIBUTE | |
| CDATA_SECTION | back to summary |
|---|---|
| public static final int CDATA_SECTION | |
| COMMENT | back to summary |
|---|---|
| public static final int COMMENT | |
| DOCUMENT | back to summary |
|---|---|
| public static final int DOCUMENT | |
| DOCUMENT_FRAGMENT | back to summary |
|---|---|
| public static final int DOCUMENT_FRAGMENT | |
| DOCUMENT_TYPE | back to summary |
|---|---|
| public static final int DOCUMENT_TYPE | |
| ELEMENT | back to summary |
|---|---|
| public static final int ELEMENT | |
| ENTITY | back to summary |
|---|---|
| public static final int ENTITY | |
| ENTITY_REFERENCE | back to summary |
|---|---|
| public static final int ENTITY_REFERENCE | |
| hashET | back to summary |
|---|---|
| pack-priv ExtendedType hashET Workspace for lookup. NOT THREAD SAFE! | |
| m_capacity | back to summary |
|---|---|
| private int m_capacity The capacity of the hash table, i.e. the size of the internal HashEntry array. | |
| m_defaultExtendedTypes | back to summary |
|---|---|
| private static ExtendedType[] m_defaultExtendedTypes The array to store the default extended types. | |
| m_extendedTypes | back to summary |
|---|---|
| private ExtendedType[] m_extendedTypes Array of extended types for this document | |
| m_initialCapacity | back to summary |
|---|---|
| private static int m_initialCapacity The initial capacity of the hash table. Use a bigger number to avoid the cost of expanding the table. | |
| m_initialSize | back to summary |
|---|---|
| private static int m_initialSize The initial size of the m_extendedTypes array | |
| m_loadFactor | back to summary |
|---|---|
| private static float m_loadFactor The default load factor of the Hashtable. This is used to calcualte the threshold. | |
| m_nextType | back to summary |
|---|---|
| private int m_nextType Next available extended type | |
| m_table | back to summary |
|---|---|
| private ExpandedNameTable. The internal array to store the hash entries. Each array member is a slot for a hash bucket. | |
| m_threshold | back to summary |
|---|---|
| private int m_threshold The threshold of the hash table, which is equal to capacity * loadFactor. If the number of entries in the hash table is bigger than the threshold, the hash table needs to be expanded. | |
| NAMESPACE | back to summary |
|---|---|
| public static final int NAMESPACE | |
| NOTATION | back to summary |
|---|---|
| public static final int NOTATION | |
| PROCESSING_INSTRUCTION | back to summary |
|---|---|
| public static final int PROCESSING_INSTRUCTION | |
| TEXT | back to summary |
|---|---|
| public static final int TEXT | |
| ExpandedNameTable | back to summary |
|---|---|
| public ExpandedNameTable() Create an expanded name table. | |
| getExpandedTypeID | back to summary |
|---|---|
| public int getExpandedTypeID(String namespace, String localName, int type) Given an expanded name represented by namespace, local name and node type, return an ID. If the expanded-name does not exist in the internal tables, the entry will be created, and the ID will be returned. Any additional nodes that are created that have this expanded name will use this ID. | |
| getExpandedTypeID | back to summary |
|---|---|
| public int getExpandedTypeID(String namespace, String localName, int type, boolean searchOnly) Given an expanded name represented by namespace, local name and node type, return an ID. If the expanded-name does not exist in the internal tables, the entry will be created, and the ID will be returned. Any additional nodes that are created that have this expanded name will use this ID. If searchOnly is true, we will return -1 if the name is not found in the table, otherwise the name is added to the table and the expanded name id of the new entry is returned. | |
| getExpandedTypeID | back to summary |
|---|---|
| public int getExpandedTypeID(int type) Given a type, return an expanded name ID.Any additional nodes that are created that have this expanded name will use this ID.
| |
| getExtendedTypes | back to summary |
|---|---|
| public ExtendedType[] getExtendedTypes() Return the array of extended types
| |
| getLocalName | back to summary |
|---|---|
| public String getLocalName(int ExpandedNameID) Given an expanded-name ID, return the local name part.
| |
| getLocalNameID | back to summary |
|---|---|
| public final int getLocalNameID(int ExpandedNameID) Given an expanded-name ID, return the local name ID.
| |
| getNamespace | back to summary |
|---|---|
| public String getNamespace(int ExpandedNameID) Given an expanded-name ID, return the namespace URI part.
| |
| getNamespaceID | back to summary |
|---|---|
| public final int getNamespaceID(int ExpandedNameID) Given an expanded-name ID, return the namespace URI ID.
| |
| getSize | back to summary |
|---|---|
| public int getSize() Return the size of the ExpandedNameTable
| |
| getType | back to summary |
|---|---|
| public final short getType(int ExpandedNameID) Given an expanded-name ID, return the local name ID.
| |
| initExtendedTypes | back to summary |
|---|---|
| private void initExtendedTypes() Initialize the vector of extended types with the basic DOM node types. | |
| rehash | back to summary |
|---|---|
| private void rehash() Increases the capacity of and internally reorganizes the hashtable, in order to accommodate and access its entries more efficiently. This method is called when the number of keys in the hashtable exceeds this hashtable's capacity and load factor. | |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv int | |
| pack-priv ExtendedType | |
| pack-priv ExpandedNameTable. | |
| pack-priv int |
| Access | Constructor and Description |
|---|---|
| protected |
| hash | back to summary |
|---|---|
| pack-priv int hash | |
| key | back to summary |
|---|---|
| pack-priv ExtendedType key | |
| next | back to summary |
|---|---|
| pack-priv ExpandedNameTable. | |
| value | back to summary |
|---|---|
| pack-priv int value | |
| HashEntry | back to summary |
|---|---|
| protected HashEntry(ExtendedType key, int value, int hash, ExpandedNameTable. | |