/** * Returns all the values that trigger this keyword, or null if the number of such * values is unlimited. * * @param keyword the keyword * @return the values that trigger this keyword, or null. The returned collection * is immutable. It will be empty if the keyword is not defined. * @stable ICU 4.8 */ public Collection<Double> getAllKeywordValues(String keyword) { return getAllKeywordValues(keyword, SampleType.INTEGER); }
/** * Returns the unique value that this keyword matches, or {@link #NO_UNIQUE_VALUE} * if the keyword matches multiple values or is not defined for this PluralRules. * * @param keyword the keyword to check for a unique value * @return The unique value for the keyword, or NO_UNIQUE_VALUE. * @stable ICU 4.8 */ public double getUniqueKeywordValue(String keyword) { Collection<Double> values = getAllKeywordValues(keyword); if (values != null && values.size() == 1) { return values.iterator().next(); } return NO_UNIQUE_VALUE; }
return KeywordStatus.INVALID; Collection<Double> values = pluralRules.getAllKeywordValues(keyword); if (values == null) { return KeywordStatus.UNBOUNDED;