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.
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
PluralFormatter() |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
static String |
count(Number cnt, String value, String valuePlural)
Produce the singular or plural form of a token based on a provided count.
| ||||||||||
static String |
countS(Number cnt, String value)
A specialized version of #count(int, String, String) count that assumes that the
plural form of a provided singular token is created by appending the 's' character to the
singular token.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
|
Produce the singular or plural form of a token based on a provided count.
cnt | count |
---|---|
value | singular token |
valuePlural | plural token |
A specialized version of #count(int, String, String) count that assumes that the plural form of a provided singular token is created by appending the 's' character to the singular token.
cnt | count |
---|---|
value | singular token |