public class SoyMsgPluralCaseSpec extends Object
ZERO, ONE, TWO,
FEW, MANY or OTHER. Here, a number is represented by the number
explicitValue with status set to EXPLICIT and the remaining by an enum value.| Modifier and Type | Class and Description |
|---|---|
static class |
SoyMsgPluralCaseSpec.Type
The type.
|
| Constructor and Description |
|---|
SoyMsgPluralCaseSpec(int explicitValue)
Constructs an object from a numeric value.
|
SoyMsgPluralCaseSpec(SoyMsgPluralCaseSpec.Type type)
Constructs an object from a non-numeric value.
|
SoyMsgPluralCaseSpec(String typeStr)
Constructs an object from a non-numeric value.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object other) |
int |
getExplicitValue()
Get the numeric value.
|
SoyMsgPluralCaseSpec.Type |
getType()
Get the type.
|
int |
hashCode() |
String |
toString() |
public SoyMsgPluralCaseSpec(String typeStr)
typeStr - String representation of the non-numeric value.IllegalArgumentException - if typeStr (after converting to upper
case) does not match with any of the enum types.public SoyMsgPluralCaseSpec(SoyMsgPluralCaseSpec.Type type)
public SoyMsgPluralCaseSpec(int explicitValue)
explicitValue - The numeric value.SoyMsgException - if invalid numeric value.public SoyMsgPluralCaseSpec.Type getType()
public int getExplicitValue()