diff options
| author | Benjamin J. Culkin <bjculkin@mix.wvu.edu> | 2020-09-10 17:12:59 -0300 |
|---|---|---|
| committer | Benjamin J. Culkin <bjculkin@mix.wvu.edu> | 2020-09-10 17:12:59 -0300 |
| commit | 229054f4839ad99c8c9fc757cce7edc0d2ca3cf1 (patch) | |
| tree | f9de568967b82c46f6d22eda9c843529b6045b5d /src/main/java/bjc/inflexion/nouns/SimpleInflectionAffix.java | |
| parent | cb45132debdbce593a235323e9155b5c47906558 (diff) | |
| parent | e71ef0d03e87df19900db8328cda68d38d523b0b (diff) | |
Merge branch 'master' of https://github.com/bculkin2442/Inflexion
Diffstat (limited to 'src/main/java/bjc/inflexion/nouns/SimpleInflectionAffix.java')
| -rw-r--r-- | src/main/java/bjc/inflexion/nouns/SimpleInflectionAffix.java | 35 |
1 files changed, 21 insertions, 14 deletions
diff --git a/src/main/java/bjc/inflexion/nouns/SimpleInflectionAffix.java b/src/main/java/bjc/inflexion/nouns/SimpleInflectionAffix.java index 93a22e6..278ad4e 100644 --- a/src/main/java/bjc/inflexion/nouns/SimpleInflectionAffix.java +++ b/src/main/java/bjc/inflexion/nouns/SimpleInflectionAffix.java @@ -24,8 +24,8 @@ import java.util.regex.Pattern; */ public class SimpleInflectionAffix implements InflectionAffix { /* Format string for toString. */ - private static final String TOSTRING_FMT = - "SimpleInflectionAffix [affixTemplate=%s, affixMatcher=%s]"; + private static final String TOSTRING_FMT + = "SimpleInflectionAffix [affixTemplate=%s, affixMatcher=%s]"; /* Affix template. */ private final String affixTmplate; @@ -36,13 +36,13 @@ public class SimpleInflectionAffix implements InflectionAffix { * Create a new inflection affix. * * @param affixTemplate - * The template for applying the affix, Should be a printf-style - * format string with a single string blank. + * The template for applying the affix, Should be a + * printf-style format string with a single string blank. * * @param affixMatcher - * The regular expression that matches the affix on strings. The - * 'stem' or word should be placed in a named capturing group named - * 'stem'. + * The regular expression that matches the affix on + * strings. The 'stem' or word should be placed in a named + * capturing group named 'stem'. */ public SimpleInflectionAffix(final String affixTemplate, final Pattern affixMatcher) { affixTmplate = affixTemplate; @@ -85,21 +85,28 @@ public class SimpleInflectionAffix implements InflectionAffix { @Override public boolean equals(final Object obj) { - if (this == obj) return true; + if (this == obj) + return true; - if (obj == null) return false; + if (obj == null) + return false; - if (!(obj instanceof SimpleInflectionAffix)) return false; + if (!(obj instanceof SimpleInflectionAffix)) + return false; final SimpleInflectionAffix other = (SimpleInflectionAffix) obj; if (affixTmplate == null) { - if (other.affixTmplate != null) return false; - } else if (!affixTmplate.equals(other.affixTmplate)) return false; + if (other.affixTmplate != null) + return false; + } else if (!affixTmplate.equals(other.affixTmplate)) + return false; if (affixMtcher == null) { - if (other.affixMtcher != null) return false; - } else if (!affixMtcher.equals(other.affixMtcher)) return false; + if (other.affixMtcher != null) + return false; + } else if (!affixMtcher.equals(other.affixMtcher)) + return false; return true; } |
