Package com.pnfsoftware.jeb.util.format
Class PluralFormatter
java.lang.Object
com.pnfsoftware.jeb.util.format.PluralFormatter
A text formatter that takes quantities into account to produce singular-form or plural-form
tokens.
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
PluralFormatter
public PluralFormatter()
-
-
Method Details
-
count
Produce the singular or plural form of a token based on a provided count.- Parameters:
cnt
- countvalue
- singular tokenvaluePlural
- plural token- Returns:
-
countS
A specialized version ofcount
that assumes that the plural form of a provided singular token is created by appending the 's' character to the singular token.- Parameters:
cnt
- countvalue
- singular token- Returns:
-