Class PName2
java.lang.Object
com.fasterxml.aalto.in.PName
com.fasterxml.aalto.in.ByteBasedPName
com.fasterxml.aalto.in.PName2
Specialized implementation of PName: can be used for short Strings
that consists of at most 8 bytes. In general this means ascii-only
names (but possibly qualified by a short prefix)
The reason for such specialized classes is mostly space efficiency; and to a lesser degree performance. Both are achieved for short Strings by avoiding another level of indirection (via quad arrays)
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) final int(package private) final intFields inherited from class ByteBasedPName
mHashFields inherited from class PName
_localName, _namespaceBinding, _prefix, _prefixedName -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateBoundName(NsBinding nsb) booleanequals(int[] quads, int qlen) booleanequals(int quad1, int quad2) intintintgetQuad(int index) booleanhashEquals(int h, int[] quads, int qlen) booleanhashEquals(int h, int quad1, int quad2) intMethods inherited from class ByteBasedPName
hashCodeMethods inherited from class PName
boundEquals, boundEquals, boundHashCode, boundHashCode, constructQName, constructQName, equals, getLocalName, getNsBinding, getNsUri, getPrefix, getPrefixedName, hasPrefix, hasPrefixedName, isBound, needsBinding, toString, unboundEquals, unboundHashCode
-
Field Details
-
mQuad1
final int mQuad1 -
mQuad2
final int mQuad2
-
-
Constructor Details
-
PName2
-
-
Method Details
-
createBoundName
- Specified by:
createBoundNamein classPName
-
equals
public boolean equals(int quad1, int quad2) - Specified by:
equalsin classByteBasedPName
-
equals
public boolean equals(int[] quads, int qlen) - Specified by:
equalsin classByteBasedPName
-
hashEquals
public boolean hashEquals(int h, int quad1, int quad2) - Specified by:
hashEqualsin classByteBasedPName
-
hashEquals
public boolean hashEquals(int h, int[] quads, int qlen) - Specified by:
hashEqualsin classByteBasedPName
-
getFirstQuad
public int getFirstQuad()- Specified by:
getFirstQuadin classByteBasedPName
-
getLastQuad
public int getLastQuad()- Specified by:
getLastQuadin classPName
-
getQuad
public int getQuad(int index) - Specified by:
getQuadin classByteBasedPName
-
sizeInQuads
public int sizeInQuads()- Specified by:
sizeInQuadsin classByteBasedPName
-