diff options
| author | Ben Culkin <scorpress@gmail.com> | 2020-04-13 18:44:24 -0400 |
|---|---|---|
| committer | Ben Culkin <scorpress@gmail.com> | 2020-04-13 18:44:24 -0400 |
| commit | 2f6a7807f7180fb467e3d06f2af4263a45759c28 (patch) | |
| tree | a2c07895dd0f2ab60e864f402e8a38ad0ca0735a /src/main/java/bjc/inflexion/nouns/Noun.java | |
| parent | 5c76def2cdba199ca42ffc440506f6c17624196d (diff) | |
Cleanup pass
Pass to do some cleanups
Diffstat (limited to 'src/main/java/bjc/inflexion/nouns/Noun.java')
| -rw-r--r-- | src/main/java/bjc/inflexion/nouns/Noun.java | 49 |
1 files changed, 24 insertions, 25 deletions
diff --git a/src/main/java/bjc/inflexion/nouns/Noun.java b/src/main/java/bjc/inflexion/nouns/Noun.java index bfb7bb9..ae7e2ae 100644 --- a/src/main/java/bjc/inflexion/nouns/Noun.java +++ b/src/main/java/bjc/inflexion/nouns/Noun.java @@ -29,10 +29,10 @@ public class Noun { * Create a new noun from a word and inflection. * * @param wrd - * The word for the noun. + * The word for the noun. * * @param inflction - * The inflection for the word. + * The inflection for the word. */ public Noun(final String wrd, final NounInflection inflction) { word = wrd; @@ -42,8 +42,7 @@ public class Noun { /** * Get the input noun. * - * @return - * The noun, as input. + * @return The noun, as input. */ public String getWord() { return word; @@ -52,8 +51,7 @@ public class Noun { /** * Get the inflection for this noun. * - * @return - * The inflection for this noun. + * @return The inflection for this noun. */ public NounInflection getInflection() { return inflection; @@ -62,8 +60,7 @@ public class Noun { /** * Check if this noun is singular. * - * @return - * Whether or not the noun is singular. + * @return Whether or not the noun is singular. */ public boolean isSingular() { return inflection.isSingular(word); @@ -72,40 +69,44 @@ public class Noun { /** * Check if this noun is plural. * - * @return - * Whether or not this noun is plural. + * @return Whether or not this noun is plural. */ public boolean isPlural() { return inflection.isPlural(word); } /** - * Check whether or not this noun is uninflected (does not change in singular/plural). + * Check whether or not this noun is uninflected (does not change in + * singular/plural). + * * @return Whether or not the noun is uninflected. */ public boolean isUninflected() { String singlar = singular(); - - if (singlar.equals(modernPlural()) || singlar.equals(classicalPlural())) return true; - + + if (singlar.equals(modernPlural()) || singlar.equals(classicalPlural())) + return true; + return false; } - + /** * Check if this noun has differing modern/classical plural forms. + * * @return Whether this noun has differing plural forms. */ public boolean isDifferingPlural() { return modernPlural().equals(classicalPlural()); } + /** * Get the singular form of this noun. * - * @return - * The singular form of this noun. + * @return The singular form of this noun. */ public String singular() { - if (isSingular()) return word; + if (isSingular()) + return word; return inflection.singularize(word); } @@ -113,11 +114,11 @@ public class Noun { /** * Get the plural form of this noun. * - * @return - * The plural form of this noun. + * @return The plural form of this noun. */ public String plural() { - if (isPlural()) return word; + if (isPlural()) + return word; return inflection.pluralize(word); } @@ -130,8 +131,7 @@ public class Noun { /** * Get the modern plural form of this noun. * - * @return - * The modern plural form of this noun. + * @return The modern plural form of this noun. */ public String modernPlural() { if (isPlural()) { @@ -148,8 +148,7 @@ public class Noun { /** * Get the classical plural form of this noun. * - * @return - * The classical plural form of this noun. + * @return The classical plural form of this noun. */ public String classicalPlural() { if (isPlural()) { |
