public class SuffixTransformerRule extends TransformerRule
TransformerRule. If the given string ends with a specific suffix, that
suffix is replaced by a suffix for the result form.| Modifier and Type | Field and Description |
|---|---|
private String |
destinationSuffix |
private String |
sourceSuffix |
| Constructor and Description |
|---|
SuffixTransformerRule(String sourceSuffix,
String destinationSuffix)
The constructor.
|
private final String sourceSuffix
SuffixTransformerRule(String, String)private final String destinationSuffix
SuffixTransformerRule(String, String)public SuffixTransformerRule(String sourceSuffix, String destinationSuffix)
sourceSuffix - is the suffix of the plural form. If a plural term ends with that suffix, this rule will apply
and replace it with the given singularSuffix.destinationSuffix - is the suffix of the singular form. It is the replacement for pluralSuffix. Use
the empty string if you just want to remove the pluralSuffix.public String transform(String string, String stringLowerCase)
transform in class TransformerRulestring - is the original string to modify.stringLowerCase - is the string in lower-case.string or null if this rule does NOT apply and the string should NOT
be replaced.Singularizer.transform(String)Copyright © 2001–2016 mmm-Team. All rights reserved.