Package com.fasterxml.aalto.in
Class PName1
java.lang.Object
com.fasterxml.aalto.in.PName
com.fasterxml.aalto.in.ByteBasedPName
com.fasterxml.aalto.in.PName1
Specialized implementation of PName: can be used for short Strings
that consists of at most 4 bytes. In general this means ascii-only
unqualified names.
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
FieldsFields inherited from class com.fasterxml.aalto.in.ByteBasedPName
mHashFields inherited from class com.fasterxml.aalto.in.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) intfinal intintgetQuad(int index) booleanhashEquals(int h, int[] quads, int qlen) booleanhashEquals(int h, int quad1, int quad2) intMethods inherited from class com.fasterxml.aalto.in.ByteBasedPName
hashCodeMethods inherited from class com.fasterxml.aalto.in.PName
boundEquals, boundEquals, boundHashCode, boundHashCode, constructQName, constructQName, equals, getLocalName, getNsBinding, getNsUri, getPrefix, getPrefixedName, hasPrefix, hasPrefixedName, isBound, needsBinding, toString, unboundEquals, unboundHashCode
-
Field Details
-
mQuad
final int mQuad
-
-
Constructor Details
-
PName1
-
-
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 final int getLastQuad()- Specified by:
getLastQuadin classPName
-
getQuad
public int getQuad(int index) - Specified by:
getQuadin classByteBasedPName
-
sizeInQuads
public int sizeInQuads()- Specified by:
sizeInQuadsin classByteBasedPName
-