diff options
| author | bculkin2442 <bjculkin@mix.wvu.edu> | 2018-10-14 20:15:17 -0400 |
|---|---|---|
| committer | bculkin2442 <bjculkin@mix.wvu.edu> | 2018-10-14 20:15:17 -0400 |
| commit | 004bc5de7618bc44079e6cdd21a50d6814c76c50 (patch) | |
| tree | 3cbcc77bf04c7dae4c8ad3d745d181d4bfca77fb /src/main/java/bjc/inflexion/nouns | |
| parent | b09885e13d8829ee59e10ec0a957f6209c3e4aeb (diff) | |
General update
Testing, plus some reorganization
Diffstat (limited to 'src/main/java/bjc/inflexion/nouns')
| -rw-r--r-- | src/main/java/bjc/inflexion/nouns/Noun.java | 23 |
1 files changed, 20 insertions, 3 deletions
diff --git a/src/main/java/bjc/inflexion/nouns/Noun.java b/src/main/java/bjc/inflexion/nouns/Noun.java index 25cd04a..bfb7bb9 100644 --- a/src/main/java/bjc/inflexion/nouns/Noun.java +++ b/src/main/java/bjc/inflexion/nouns/Noun.java @@ -20,8 +20,6 @@ package bjc.inflexion.nouns; * @author EVE */ public class Noun { - /* Format string for toString. */ - private static final String TOSTRING_FMT = "Noun [word=%s, inflection=%s]"; /* The word itself. */ private final String word; /* Its inflection. */ @@ -82,6 +80,25 @@ public class Noun { } /** + * 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; + + 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 @@ -107,7 +124,7 @@ public class Noun { @Override public String toString() { - return String.format(TOSTRING_FMT, word, inflection); + return String.format("Noun [word=%s, inflection=%s]", word, inflection); } /** |
