|
CTAT 3.1 Function Reference | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectedu.cmu.pact.BehaviorRecorder.ProblemModel.Matcher.Functions.plural
public class plural
Under control of a given count, return the singular or plural form of a word.
| Constructor Summary | |
|---|---|
plural()
|
|
| Method Summary | |
|---|---|
static void |
main(String[] args)
Test harness for command-line use. |
String |
plural(int count,
String word)
Under control of a given count, return the singular or plural form of a word. |
String |
plural(int count,
String word,
String suffixToStrip,
String suffixToAdd)
Under control of a given count, return the singular or plural form of a word. |
static void |
usageExit(String intro)
Print a usage message and exit. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public plural()
| Method Detail |
|---|
public String plural(int count,
String word)
Under control of a given count, return the singular or plural form of a word. If the given count is greater than one, make the given word plural using default rules.
count - number to testword - singular form of word to modify
public String plural(int count,
String word,
String suffixToStrip,
String suffixToAdd)
Under control of a given count, return the singular or plural form of a word. If the given count is greater than one, make the given word plural by removing a given suffix and appending a different one.
count - number to testword - singular form of word to modifysuffixToStrip - suffixToAdd - new suffix to add
public static void usageExit(String intro)
intro - optional prefix to messagepublic static void main(String[] args)
args - see usageExit(String)
|
CTAT 3.1 Function Reference | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||