public class StaticStringsHash extends Object
The current set of methods is:
getKey(String) method can be used to use the selected hash
method to produce a key. The method string will contain
"length()", "charAt(n)", or "hashCode()", and is intended for use by
code generators.
The keys array will contain the full set of unique keys.
The buckets array will contain a set of arrays, one for
each key in the keys, where buckets[x][y]
is an index into the strings array.
| Modifier and Type | Field and Description |
|---|---|
int[][] |
buckets
Buckets for each key, where buckets[x][y] is an index
into the strings[] array.
|
int[] |
keys
Unique hash keys
|
String |
method
The method to invoke on String to produce the hash key
|
String[] |
strings
The set of strings upon which the hash info is created
|
| Constructor and Description |
|---|
StaticStringsHash(String[] strings)
Constructor
|
public String[] strings
public int[] keys
public int[][] buckets
public String method
public StaticStringsHash(String[] strings)
strings - the set of strings upon which to
find an optimal hash method. Must not contain
duplicates.Copyright © 2017. All Rights Reserved.