Top Description Fields Constructors Methods
com.fasterxml.aalto.in

public abstract Class ByteBasedPName

extends PName
Class Inheritance
Known Direct Subclasses
com.fasterxml.aalto.in.PName1, com.fasterxml.aalto.in.PName2, com.fasterxml.aalto.in.PName3, com.fasterxml.aalto.in.PNameN

This intermediate abstract class defines more specialized API needed by components like symbol tables, which need to provide efficient access to byte-based PNames. Byte-based names can be used to directly convert byte sequences to actual character-based names, without intervening byte-to-character decoding phase.

Field Summary

Modifier and TypeField and Description
protected final int
mHash

Since the hash is calculated different from the way eventual String's hash will be (bit faster, not significantly worse hashing uniformness), we need to store that hash here.

Inherited from com.fasterxml.aalto.in.PName:
_localName_namespaceBinding_prefix_prefixedName

Constructor Summary

AccessConstructor and Description
protected
ByteBasedPName(String pname, String prefix, String ln, int hash)

Method Summary

Modifier and TypeMethod and Description
public abstract boolean
equals(int quad1, int quad2)

public abstract boolean
equals(int[] quads, int qlen)

public abstract int
public abstract int
getQuad(int index)

Implements abstract com.fasterxml.aalto.in.PName.getQuad.

public int
hashCode()

Overrides com.fasterxml.aalto.in.PName.hashCode.

Whether we should use internal hash, or the hash of prefixed name string itself is an open question.
public abstract boolean
hashEquals(int h, int quad1, int quad2)

public abstract boolean
hashEquals(int h, int[] quads, int qlen)

public abstract int
Inherited from com.fasterxml.aalto.in.PName:
boundEqualsboundEqualsboundHashCodeboundHashCodeconstructQNameconstructQNamecreateBoundNameequalsgetLastQuadgetLocalNamegetNsBindinggetNsUrigetPrefixgetPrefixedNamehasPrefixhasPrefixedNameisBoundneedsBindingtoStringunboundEqualsunboundHashCode

Field Detail

mHashback to summary
protected final int mHash

Since the hash is calculated different from the way eventual String's hash will be (bit faster, not significantly worse hashing uniformness), we need to store that hash here.

Constructor Detail

ByteBasedPNameback to summary
protected ByteBasedPName(String pname, String prefix, String ln, int hash)

Method Detail

equalsback to summary
public abstract boolean equals(int quad1, int quad2)
equalsback to summary
public abstract boolean equals(int[] quads, int qlen)
getFirstQuadback to summary
public abstract int getFirstQuad()

Implements abstract com.fasterxml.aalto.in.PName.getFirstQuad.

Annotations
@Override
getQuadback to summary
public abstract int getQuad(int index)

Implements abstract com.fasterxml.aalto.in.PName.getQuad.

Annotations
@Override
hashCodeback to summary
public int hashCode()

Overrides com.fasterxml.aalto.in.PName.hashCode.

Whether we should use internal hash, or the hash of prefixed name string itself is an open question. For now, let's use former.

Returns:int

Doc from java.lang.Object.hashCode.

a hash code value for this object.

Annotations
@Override
hashEqualsback to summary
public abstract boolean hashEquals(int h, int quad1, int quad2)
hashEqualsback to summary
public abstract boolean hashEquals(int h, int[] quads, int qlen)
sizeInQuadsback to summary
public abstract int sizeInQuads()

Implements abstract com.fasterxml.aalto.in.PName.sizeInQuads.

Annotations
@Override