Home | History | Annotate | Download | only in impl

Lines Matching defs:keyword

46     private final String keyword;
49 keyword = kw;
53 * @return the lowercase CLDR keyword string for the plural form
56 return keyword;
60 * @param keyword for example "few" or "other"
61 * @return the plural form corresponding to the keyword, or null
63 public static final StandardPlural orNullFromString(CharSequence keyword) {
64 switch (keyword.length()) {
66 if ("one".contentEquals(keyword)) {
68 } else if ("two".contentEquals(keyword)) {
70 } else if ("few".contentEquals(keyword)) {
75 if ("many".contentEquals(keyword)) {
77 } else if ("zero".contentEquals(keyword)) {
82 if ("other".contentEquals(keyword)) {
93 * @param keyword for example "few" or "other"
94 * @return the plural form corresponding to the keyword, or OTHER
96 public static final StandardPlural orOtherFromString(CharSequence keyword) {
97 StandardPlural p = orNullFromString(keyword);
102 * @param keyword for example "few" or "other"
103 * @return the plural form corresponding to the keyword
104 * @throws IllegalArgumentException if the keyword is not a plural form
106 public static final StandardPlural fromString(CharSequence keyword) {
107 StandardPlural p = orNullFromString(keyword);
111 throw new IllegalArgumentException(keyword.toString());
116 * @param keyword for example "few" or "other"
117 * @return the index of the plural form corresponding to the keyword, or a negative value
119 public static final int indexOrNegativeFromString(CharSequence keyword) {
120 StandardPlural p = orNullFromString(keyword);
125 * @param keyword for example "few" or "other"
126 * @return the index of the plural form corresponding to the keyword, or OTHER_INDEX
128 public static final int indexOrOtherIndexFromString(CharSequence keyword) {
129 StandardPlural p = orNullFromString(keyword);
134 * @param keyword for example "few" or "other"
135 * @return the index of the plural form corresponding to the keyword
136 * @throws IllegalArgumentException if the keyword is not a plural form
138 public static final int indexFromString(CharSequence keyword) {
139 StandardPlural p = orNullFromString(keyword);
143 throw new IllegalArgumentException(keyword.toString());