// Check whether the plural value matches any explicit numeric value.
boolean hasNonExplicitCases = false;
List<SoyMsgPart> otherCaseParts = null;
for (Pair<SoyMsgPluralCaseSpec, List<SoyMsgPart>> case0 : pluralPart.getCases()) {
SoyMsgPluralCaseSpec pluralCaseSpec = case0.first;
SoyMsgPluralCaseSpec.Type caseType = pluralCaseSpec.getType();
if (caseType == SoyMsgPluralCaseSpec.Type.EXPLICIT) {
if (pluralCaseSpec.getExplicitValue() == correctPluralValue) {
caseParts = case0.second;
break;
}
} else if (caseType == SoyMsgPluralCaseSpec.Type.OTHER) {
otherCaseParts = case0.second;
} else {
hasNonExplicitCases = true;
}
}
if (caseParts == null && !hasNonExplicitCases) {
caseParts = otherCaseParts;
}
if (caseParts == null) {
// Didn't match any numeric value. Check which plural rule it matches.
String pluralKeyword = PluralRules.forLocale(locale).select(currentPluralRemainderValue);
SoyMsgPluralCaseSpec.Type correctCaseType =
new SoyMsgPluralCaseSpec(pluralKeyword).getType();
// Iterate the cases once again for non-numeric keywords.
for (Pair<SoyMsgPluralCaseSpec, List<SoyMsgPart>> case0 : pluralPart.getCases()) {