public static class NonsenseGenerator.Utils
extends java.lang.Object
Constructor and Description |
---|
Utils() |
Modifier and Type | Method and Description |
---|---|
static boolean |
startsWithArticle(java.lang.String sNoun)
Given a string, indicates whether that string begins with an article,
which could be split from the front of the noun string.
|
static java.lang.String |
whichIndefiniteArticle(java.lang.String sNext,
boolean bCapitalize)
Evaluates which indefinite article should be used before the "next"
word, which is, or modifies, a noun.
|
public static boolean startsWithArticle(java.lang.String sNoun)
This was formerly NonsenseBuilder
's
hasArticle(String)
method.
sNoun
- the string which is probably a noun and might or might
not also begin with an articletrue
iff the string begins with an articlepublic static java.lang.String whichIndefiniteArticle(java.lang.String sNext, boolean bCapitalize)
This was formerly NonsenseBuilder
's
whichIndefiniteArticle(String,boolean)
method.
sNext
- the "next" word in a phrase or sentencebCapitalize
- specifies whether to capitalize the article"a"
or "an"