|
JML | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.multijava.util.jperf.JPerf
This class represents the perfect hashing function generator
| Field Summary | |
private String[] |
EQUALS_FUNCTION
|
private String[] |
FIND_FUNCTION
|
private String[] |
footer
|
private Graph |
graph
|
private String[] |
HASH_FUNCTION
|
private String[] |
header
|
private Keywords |
keywords
|
private long |
maxNodeCount
|
private Table |
table1
|
private Table |
table2
|
| Constructor Summary | |
JPerf(String[] keywords,
String[] header,
String[] footer)
Constructs a JPerf object with default load factor. |
|
JPerf(String[] keywords,
String[] header,
String[] footer,
double loadFactor)
Constructs a JPerf object |
|
| Method Summary | |
private boolean |
addKey(String key,
long value)
Adds a `key -> value' pair. |
void |
build()
Builds tables and graph. |
void |
genCode(String fileName)
Dumps result to class source. |
private void |
printStringArray(PrintWriter out,
String[] lines)
Prints a string array to the output file. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
private final String[] EQUALS_FUNCTION
private final String[] HASH_FUNCTION
private final String[] FIND_FUNCTION
private final Keywords keywords
private final String[] header
private final String[] footer
private final long maxNodeCount
private Table table1
private Table table2
private Graph graph
| Constructor Detail |
public JPerf(String[] keywords,
String[] header,
String[] footer,
double loadFactor)
keywords - the keywords to hashheader - the verbatim part to output at the beginning of the filefooter - the verbatim part to output at the end of the file
public JPerf(String[] keywords,
String[] header,
String[] footer)
keywords - the keywords to hashheader - the verbatim part to output at the beginning of the filefooter - the verbatim part to output at the end of the file| Method Detail |
public void build()
private boolean addKey(String key,
long value)
public void genCode(String fileName)
throws IOException
fileName - the name of the output file.
IOException
private void printStringArray(PrintWriter out,
String[] lines)
|
JML | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||