Lines Matching defs:index
73 * @param index value of -1 indicates no predecessor [used in initialisation]
75 * the predecessor string specified the index.
77 * index and byte b. Else return the code allocated for combination index + b.
79 public int addCharString(short index, byte b) {
86 hshidx = hash(index, b);
93 if (index == HASH_FREE) {
97 strNxt[numStrings] = index;
98 strLen[numStrings] = strLen[index] + 1;
105 * @param index index to prefix string
106 * @param b the character that follws the index prefix
107 * @return b if param index is HASH_FREE. Else return the code
110 public short findCharString(short index, byte b) {
113 if (index == HASH_FREE) {
117 hshidx = hash(index, b);
119 if (strNxt[nxtidx] == index && strChr[nxtidx] == b) {
145 static public int hash(short index, byte lastbyte) {
146 return ((int)((short)(lastbyte << 8) ^ index) & 0xFFFF) % HASHSIZE;