at.dms.compiler.tools.jperf
Class Keywords

java.lang.Object
  extended by at.dms.compiler.tools.jperf.Keywords

public class Keywords
extends Object

This class contains the keywords to hash


Constructor Summary
Keywords(String[] keywords)
          Creates a Keywords object
 
Method Summary
 String elementAt(int index)
          Returns the keyword at specified index.
 void genCode(PrintWriter out)
          Prints keyword related code to the output file.
 char getMaxCharValue()
          Returns the largest ASCII value in all keys.
 int getMaxWordLength()
          Returns the length of the longest keyword.
 char getMinCharValue()
          Returns the smallest ASCII value in all keys.
 int size()
          Returns the number of keywords.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Keywords

public Keywords(String[] keywords)
Creates a Keywords object

Parameters:
keywords - the array of keywords.
Method Detail

size

public final int size()
Returns the number of keywords.


elementAt

public final String elementAt(int index)
Returns the keyword at specified index. Keeps encapsulation.


getMaxWordLength

public final int getMaxWordLength()
Returns the length of the longest keyword.


getMinCharValue

public final char getMinCharValue()
Returns the smallest ASCII value in all keys.


getMaxCharValue

public final char getMaxCharValue()
Returns the largest ASCII value in all keys.


genCode

public void genCode(PrintWriter out)
Prints keyword related code to the output file.

Parameters:
out - the output stream