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
mHash
Fields inherited from class com.fasterxml.aalto.in.PName
_localName, _namespaceBinding, _prefix, _prefixedName
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateBoundName
(NsBinding nsb) boolean
equals
(int[] quads, int qlen) boolean
equals
(int quad1, int quad2) int
final int
int
getQuad
(int index) boolean
hashEquals
(int h, int[] quads, int qlen) boolean
hashEquals
(int h, int quad1, int quad2) int
Methods inherited from class com.fasterxml.aalto.in.ByteBasedPName
hashCode
Methods 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:
createBoundName
in classPName
-
equals
public boolean equals(int quad1, int quad2) - Specified by:
equals
in classByteBasedPName
-
equals
public boolean equals(int[] quads, int qlen) - Specified by:
equals
in classByteBasedPName
-
hashEquals
public boolean hashEquals(int h, int quad1, int quad2) - Specified by:
hashEquals
in classByteBasedPName
-
hashEquals
public boolean hashEquals(int h, int[] quads, int qlen) - Specified by:
hashEquals
in classByteBasedPName
-
getFirstQuad
public int getFirstQuad()- Specified by:
getFirstQuad
in classByteBasedPName
-
getLastQuad
public final int getLastQuad()- Specified by:
getLastQuad
in classPName
-
getQuad
public int getQuad(int index) - Specified by:
getQuad
in classByteBasedPName
-
sizeInQuads
public int sizeInQuads()- Specified by:
sizeInQuads
in classByteBasedPName
-