|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.saxon.om.StructuredQName net.sf.saxon.om.FingerprintedQName
public class FingerprintedQName
A QName triple (prefix, URI, local) with the additional ability to hold an integer fingerprint. The integer fingerprint provides a fast way of checking equality. A FingerprintedQName makes sense only in the context of a known NamePool, and instances must be compared only if they relate to the same NamePool. The fingerprint is optional, and is used only if present.
Constructor Summary | |
---|---|
FingerprintedQName(String prefix,
String uri,
String localName)
|
|
FingerprintedQName(String prefix,
String uri,
String localName,
int nameCode)
|
Method Summary | |
---|---|
int |
allocateNameCode(NamePool pool)
Allocate a nameCode from the NamePool (if none has already been allocated). |
boolean |
equals(Object other)
Compare two StructuredQName values for equality. |
static FingerprintedQName |
fromClarkName(String expandedName)
Make a structuredQName from a Clark name |
int |
getFingerprint()
Get the fingerprint of this name if known. |
int |
getNameCode()
Get the nameCode of this name if known. |
boolean |
hasFingerprint()
Ask whether this node name representation has a known namecode and fingerprint |
void |
setNameCode(int nameCode)
Set the nameCode for this QName. |
Methods inherited from class net.sf.saxon.om.StructuredQName |
---|
computeHashCode, fromLexicalQName, getClarkName, getDisplayName, getLocalPart, getNamespaceBinding, getPrefix, getStructuredQName, getURI, hashCode, isInNamespace, isInSameNamespace, toJaxpQName, toString |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface net.sf.saxon.om.NodeName |
---|
getDisplayName, getLocalPart, getNamespaceBinding, getPrefix, getStructuredQName, getURI, isInNamespace, isInSameNamespace |
Constructor Detail |
---|
public FingerprintedQName(String prefix, String uri, String localName)
public FingerprintedQName(String prefix, String uri, String localName, int nameCode)
Method Detail |
---|
public static FingerprintedQName fromClarkName(String expandedName)
expandedName
- the name in Clark notation "{uri}local" if in a namespace, or "local" otherwise.
The format "{}local" is also accepted for a name in no namespace.
IllegalArgumentException
- if the Clark name is malformedpublic boolean hasFingerprint()
hasFingerprint
in interface NodeName
hasFingerprint
in class StructuredQName
public int getFingerprint()
getFingerprint
in interface NodeName
getFingerprint
in class StructuredQName
public int getNameCode()
getNameCode
in interface NodeName
getNameCode
in class StructuredQName
public void setNameCode(int nameCode)
nameCode
- the nameCode associated with this QName by the NamePoolpublic int allocateNameCode(NamePool pool)
allocateNameCode
in interface NodeName
pool
- the namePool
public boolean equals(Object other)
StructuredQName
equals
in class StructuredQName
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |