Note
one unfortunate result of this being a somewhat different PName is that equality comparison between this and other implementations will not work as expected. As such, these should only be used as temporary names.
| Modifier and Type | Field and Description |
|---|---|
| protected final int | mHash
Since the hash may be calculated different from the way eventual String's hash will be (right now it is not), we better store "our" hash here. |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public static int | calcHash(char[] buffer, int start, int
Length of String; has to be at least 1 (caller guarantees
this pre-condition) len)Implementation of a hashing method for variable length Strings. |
| public static int | |
| public static PNameC | |
| public static PNameC | |
| public PName | |
| public boolean | |
| public int | |
| public int | |
| public final int | |
| public int | |
| public int | hashCode()
Overrides com. |
| public int | sizeInQuads()
Implements abstract com. |
| mHash | back to summary |
|---|---|
| protected final int mHash Since the hash may be calculated different from the way eventual String's hash will be (right now it is not), we better store "our" hash here. | |
| PNameC | back to summary |
|---|---|
| public PNameC(String pname, String prefix, String ln, int hash) | |
| calcHash | back to summary |
|---|---|
| public static int calcHash(char[] buffer, int start, int len) Implementation of a hashing method for variable length Strings. Most of the time intention is that this calculation is done by caller during parsing, not here; however, sometimes it needs to be done for parsed "String" too.
| |
| calcHash | back to summary |
|---|---|
| public static int calcHash(String key) | |
| construct | back to summary |
|---|---|
| public static PNameC construct(String pname) | |
| construct | back to summary |
|---|---|
| public static PNameC construct(String pname, int hash) | |
| createBoundName | back to summary |
|---|---|
| public PName createBoundName(NsBinding nsb) Implements abstract com.
| |
| equalsPName | back to summary |
|---|---|
| public boolean equalsPName(char[] buffer, int start, int len, int hash) | |
| getCustomHash | back to summary |
|---|---|
| public int getCustomHash() | |
| getFirstQuad | back to summary |
|---|---|
| public int getFirstQuad() Implements abstract com.
| |
| getLastQuad | back to summary |
|---|---|
| public final int getLastQuad() Implements abstract com.
| |
| getQuad | back to summary |
|---|---|
| public int getQuad(int index) Implements abstract com.
| |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides com. Whether we should use internal hash, or the hash of prefixed name string itself is an open question. For now, let's use former.
| |
| sizeInQuads | back to summary |
|---|---|
| public int sizeInQuads() Implements abstract com. This method should never get called on instances of this class, so let's throw an exception if that does happen.
| |