public class ExpandedNameTable extends Object
%OPT% The performance of the getExpandedTypeID() method is very important to DTM building. To get the best performance out of this class, we implement a simple hash algorithm directly into this class, instead of using the inefficient java.util.Hashtable. The code for the get and put operations are combined in getExpandedTypeID() method to share the same hash calculation code. We only need to implement the rehash() interface which is used to expand the hash table.
| Modifier and Type | Field and Description |
|---|---|
static int |
ATTRIBUTE |
static int |
ELEMENT |
static int |
NAMESPACE |
| Constructor and Description |
|---|
ExpandedNameTable()
Create an expanded name table.
|
| Modifier and Type | Method and Description |
|---|---|
int |
getExpandedTypeID(String namespace,
String localName,
int type)
Given an expanded name represented by namespace, local name and node type, return an ID.
|
int |
getLocalNameID(int expandedNameID)
Given an expanded-name ID, return the local name ID.
|
int |
getNamespaceID(int expandedNameID)
Given an expanded-name ID, return the namespace URI ID.
|
short |
getType(int expandedNameID)
Given an expanded-name ID, return the local name ID.
|
public static final int ELEMENT
public static final int ATTRIBUTE
public static final int NAMESPACE
public int getExpandedTypeID(String namespace, String localName, int type)
namespace - The namespacelocalName - The local nametype - The node typepublic final int getLocalNameID(int expandedNameID)
expandedNameID - an ID that represents an expanded-name.public final int getNamespaceID(int expandedNameID)
expandedNameID - an ID that represents an expanded-name.public final short getType(int expandedNameID)
expandedNameID - an ID that represents an expanded-name.Copyright © 2022–2023 HtmlUnit. All rights reserved.