Class DefaultPluralConverter
java.lang.Object
me.datafox.dfxengine.text.converter.DefaultPluralConverter
- All Implemented Interfaces:
PluralConverter
A
PluralConverter that converts a singular English word into plural form using a basic set of rules. If the
word ends with s, x or ch, es is appended to the end of the singular form. If the
word ends with a consonant followed by y, the y is removed and ies is appended to the end. In
all other cases, s is appended to the end.-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
DefaultPluralConverter
public DefaultPluralConverter()
-
-
Method Details
-
convert
- Specified by:
convertin interfacePluralConverter- Parameters:
singular- singular form of a noun- Returns:
- plural form of the provided noun, or
nullif the singular isnull
-