public final class SoyMsgPluralPart extends SoyMsgPart
SoyMsgPart.Case<T>| Constructor and Description |
|---|
SoyMsgPluralPart(String pluralVarName,
int offset,
Iterable<SoyMsgPart.Case<SoyMsgPluralCaseSpec>> cases) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object other) |
com.google.common.collect.ImmutableList<SoyMsgPart.Case<SoyMsgPluralCaseSpec>> |
getCases()
Returns the cases.
|
int |
getOffset()
Returns the offset.
|
String |
getPluralVarName()
Returns the plural variable name.
|
int |
hashCode() |
com.google.common.collect.ImmutableList<SoyMsgPart> |
lookupCase(long pluralValue,
com.ibm.icu.util.ULocale locale)
Returns the list of parts to implement the case.
|
public SoyMsgPluralPart(String pluralVarName, int offset, Iterable<SoyMsgPart.Case<SoyMsgPluralCaseSpec>> cases)
pluralVarName - The plural variable name.offset - The offset for this plural statement.cases - The list of cases for this plural statement.public String getPluralVarName()
public int getOffset()
public com.google.common.collect.ImmutableList<SoyMsgPart.Case<SoyMsgPluralCaseSpec>> getCases()
public com.google.common.collect.ImmutableList<SoyMsgPart> lookupCase(long pluralValue, @Nullable com.ibm.icu.util.ULocale locale)
pluralValue - The current plural valuelocale - The locale for interpreting non-specific plural parts. Allowed to be null if it
is known that there are no non-specific plural parts (This is commonly the case for default
messages, since soy only allows direct specification of explicit or 'other').