All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class key.Grammar

java.lang.Object
   |
   +----key.Grammar

public final class Grammar
extends Object
A simple grammar class. Add routines to this as they are required.


Variable Index

 o vowels

Constructor Index

 o Grammar()

Method Index

 o aAn(String)
 o commaSeperate(String[])
 o enumerate(String[])
 o getReturn(InteractiveConnection)
 o getYesNo(String, boolean, InteractiveConnection)
 o IsAre(int)
 o isAre(int)
There is 1 other person here There are 3 other people here
 o isAreCount(int)
 o isStringCompletelyAlphabetical(String)
 o newbieNewbies(int)
 o personPeople(int)
 o PersonPeople(int)
 o substitute(String, Hashtable)
The codes hashtable should be hashed on the 'character' class, and contain strings

Variables

 o vowels
 public static final String vowels

Constructors

 o Grammar
 public Grammar()

Methods

 o isAre
 public static final String isAre(int n)
There is 1 other person here There are 3 other people here

 o isAreCount
 public static final String isAreCount(int n)
 o aAn
 public static final String aAn(String w)
 o IsAre
 public static final String IsAre(int n)
 o personPeople
 public static final String personPeople(int n)
 o newbieNewbies
 public static final String newbieNewbies(int n)
 o PersonPeople
 public static final String PersonPeople(int n)
 o enumerate
 public static final String enumerate(String strings[])
 o commaSeperate
 public static final String commaSeperate(String strings[])
 o getYesNo
 public static boolean getYesNo(String prompt,
                                boolean def,
                                InteractiveConnection ic) throws IOException
Parameters:
prompt - the prompt to use
def - if they just hit return, assume yes?
ic - the interactive connection to prompt
 o getReturn
 public static void getReturn(InteractiveConnection ic) throws IOException
 o substitute
 public static String substitute(String format,
                                 Hashtable codes)
The codes hashtable should be hashed on the 'character' class, and contain strings

 o isStringCompletelyAlphabetical
 public static boolean isStringCompletelyAlphabetical(String s)
Returns:
true iff the string is of the form [a-zA-z]*

All Packages  Class Hierarchy  This Package  Previous  Next  Index