JML

org.multijava.util.jperf
Class Keywords

java.lang.Object
  extended byorg.multijava.util.jperf.Keywords

public class Keywords
extends Object

This class contains the keywords to hash


Field Summary
private  String[] keywords
           
private  char maxCharValue
           
private  int maxWordLength
           
private  char minCharValue
           
private  int minWordLength
           
 
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
 

Field Detail

keywords

private final String[] keywords

minWordLength

private final int minWordLength

maxWordLength

private final int maxWordLength

minCharValue

private final char minCharValue

maxCharValue

private final char maxCharValue
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

JML

JML is Copyright (C) 1998-2002 by Iowa State University and is distributed under the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This release depends on code from the MultiJava project and is based in part on the Kopi project Copyright (C) 1990-99 DMS Decision Management Systems Ges.m.b.H.