public class IfPlural extends AbstractParamLayoutFormatter
Modifier and Type | Field and Description |
---|---|
protected java.lang.String |
pluralText |
protected java.lang.String |
singularText |
Constructor and Description |
---|
IfPlural() |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
format(java.lang.String fieldText)
Failure Mode:
|
void |
setArgument(java.lang.String arg)
Method for setting the argument of this formatter.
|
parseArgument
protected java.lang.String pluralText
protected java.lang.String singularText
public void setArgument(java.lang.String arg)
ParamLayoutFormatter
arg
- A String argument.public java.lang.String format(java.lang.String fieldText)
LayoutFormatter
Formatters should be robust in the sense that they always return some relevant string.
If the formatter can detect an invalid input it should return the original string otherwise it may simply return a wrong output.
fieldText
- The text to layout.