CompactIntArray, CompactShortArray
| Modifier and Type | Field and Description |
|---|---|
| private static final int | |
| private static final int | |
| private static final int | |
| private int[] | |
| private static final int | |
| private static final int | |
| private short[] | |
| private boolean | |
| public static final int | UNICODECOUNT
The total number of Unicode characters. |
| private byte[] |
| Access | Constructor and Description |
|---|---|
| public | CompactByteArray(byte
the default value of the compact array. defaultValue)Constructor for CompactByteArray. |
| public | CompactByteArray(short[]
the indices of the compact array. indexArray, byte[] the values of the compact array. newValues)Constructor for CompactByteArray. |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv static final boolean | arrayRegionMatches(byte[] source, int sourceStart, byte[] target, int targetStart, int
the length to compare.
The start indices and start+len must be valid. len)Convenience utility to compare two arrays of doubles. |
| private final boolean | |
| public Object | |
| public void | |
| public byte | Returns: the mapped value of the given characterthe character to get the mapped value with index)Get the mapped value of a Unicode character. |
| public boolean | Returns: true if the current compact array object is the same as the compact array object obj; false otherwise.the compact array object to be compared with this. obj)Overrides java. Compares the equality of two compact array objects. |
| private void | |
| public short[] | |
| public byte[] | |
| public int | |
| public void | setElementAt(char
the character to set the mapped value with index, byte the new mapped value value)Set a new value for a Unicode character. |
| public void | setElementAt(char
the starting offset o of the range start, char the ending offset of the range end, byte the new mapped value value)Set new values for a range of Unicode character. |
| private final void |
| BLOCKCOUNT | back to summary |
|---|---|
| private static final int BLOCKCOUNT | |
| BLOCKMASK | back to summary |
|---|---|
| private static final int BLOCKMASK | |
| BLOCKSHIFT | back to summary |
|---|---|
| private static final int BLOCKSHIFT | |
| hashes | back to summary |
|---|---|
| private int[] hashes | |
| INDEXCOUNT | back to summary |
|---|---|
| private static final int INDEXCOUNT | |
| INDEXSHIFT | back to summary |
|---|---|
| private static final int INDEXSHIFT | |
| indices | back to summary |
|---|---|
| private short[] indices | |
| isCompact | back to summary |
|---|---|
| private boolean isCompact | |
| UNICODECOUNT | back to summary |
|---|---|
| public static final int UNICODECOUNT The total number of Unicode characters. | |
| values | back to summary |
|---|---|
| private byte[] values | |
| CompactByteArray | back to summary |
|---|---|
| public CompactByteArray(byte defaultValue) Constructor for CompactByteArray.
| |
| CompactByteArray | back to summary |
|---|---|
| public CompactByteArray(short[] indexArray, byte[] newValues) Constructor for CompactByteArray.
| |
| arrayRegionMatches | back to summary |
|---|---|
| pack-priv static final boolean arrayRegionMatches(byte[] source, int sourceStart, byte[] target, int targetStart, int len) Convenience utility to compare two arrays of doubles.
| |
| blockTouched | back to summary |
|---|---|
| private final boolean blockTouched(int i) Query whether a specified block was "touched", i.e. had a value set. Untouched blocks can be skipped when compacting the array | |
| clone | back to summary |
|---|---|
| public Object clone() Overrides java. Overrides Cloneable | |
| compact | back to summary |
|---|---|
| public void compact() Compact the array. | |
| elementAt | back to summary |
|---|---|
| public byte elementAt(char index) Get the mapped value of a Unicode character.
| |
| equals | back to summary |
|---|---|
| public boolean equals(Object obj) Overrides java. Compares the equality of two compact array objects.
| |
| expand | back to summary |
|---|---|
| private void expand() Expanding takes the array back to a 65536 element array. | |
| getIndexArray | back to summary |
|---|---|
| public short[] getIndexArray() For internal use only. Do not modify the result, the behavior of modified results are undefined. | |
| getStringArray | back to summary |
|---|---|
| public byte[] getStringArray() For internal use only. Do not modify the result, the behavior of modified results are undefined. | |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides java. Generates the hash code for the compact array object | |
| setElementAt | back to summary |
|---|---|
| public void setElementAt(char index, byte value) Set a new value for a Unicode character. Set automatically expands the array if it is compacted.
| |
| setElementAt | back to summary |
|---|---|
| public void setElementAt(char start, char end, byte value) Set new values for a range of Unicode character.
| |
| touchBlock | back to summary |
|---|---|
| private final void touchBlock(int i, int value) Remember that a specified block was "touched", i.e. had a value set. Untouched blocks can be skipped when compacting the array | |