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.
-
vowels
-
-
Grammar()
-
-
aAn(String)
-
-
commaSeperate(String[])
-
-
enumerate(String[])
-
-
getReturn(InteractiveConnection)
-
-
getYesNo(String, boolean, InteractiveConnection)
-
-
IsAre(int)
-
-
isAre(int)
- There is 1 other person here
There are 3 other people here
-
isAreCount(int)
-
-
isStringCompletelyAlphabetical(String)
-
-
newbieNewbies(int)
-
-
personPeople(int)
-
-
PersonPeople(int)
-
-
substitute(String, Hashtable)
- The codes hashtable should be hashed on the 'character'
class, and contain strings
vowels
public static final String vowels
Grammar
public Grammar()
isAre
public static final String isAre(int n)
- There is 1 other person here
There are 3 other people here
isAreCount
public static final String isAreCount(int n)
aAn
public static final String aAn(String w)
IsAre
public static final String IsAre(int n)
personPeople
public static final String personPeople(int n)
newbieNewbies
public static final String newbieNewbies(int n)
PersonPeople
public static final String PersonPeople(int n)
enumerate
public static final String enumerate(String strings[])
commaSeperate
public static final String commaSeperate(String strings[])
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
getReturn
public static void getReturn(InteractiveConnection ic) throws IOException
substitute
public static String substitute(String format,
Hashtable codes)
- The codes hashtable should be hashed on the 'character'
class, and contain strings
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