Home
last modified time | relevance | path

Searched refs:PluralRules (Results 1 – 25 of 164) sorted by relevance

1234567

/external/icu/icu4j/main/tests/core/src/com/ibm/icu/dev/test/format/
DPluralRulesTest.java52 import com.ibm.icu.text.PluralRules;
53 import com.ibm.icu.text.PluralRules.FixedDecimal;
54 import com.ibm.icu.text.PluralRules.FixedDecimalRange;
55 import com.ibm.icu.text.PluralRules.FixedDecimalSamples;
56 import com.ibm.icu.text.PluralRules.KeywordStatus;
57 import com.ibm.icu.text.PluralRules.PluralType;
58 import com.ibm.icu.text.PluralRules.SampleType;
95 PluralRules rules = factory.forLocale(locale); in testOverUnderflow()
166 PluralRules.parseDescription(rules); in testSyntaxRestrictions()
177 PluralRules test = PluralRules.createRules(description);
[all …]
DPluralRulesFactory.java11 import com.ibm.icu.text.PluralRules;
12 import com.ibm.icu.text.PluralRules.PluralType;
19 public abstract class PluralRulesFactory extends PluralRules.Factory {
31 public PluralRules forLocale(ULocale locale, PluralType ordinal) { in forLocale()
32 return PluralRules.forLocale(locale, ordinal); in forLocale()
36 return PluralRules.getAvailableULocales(); in getAvailableULocales()
40 return PluralRules.getFunctionalEquivalent(locale, isAvailable); in getFunctionalEquivalent()
DPluralFormatUnitTest.java31 import com.ibm.icu.text.PluralRules;
32 import com.ibm.icu.text.PluralRules.PluralType;
33 import com.ibm.icu.text.PluralRules.SampleType;
48 plFmts[1] = new PluralFormat(PluralRules.DEFAULT); in TestConstructor()
50 plFmts[2] = new PluralFormat(PluralRules.DEFAULT, "other{#}"); in TestConstructor()
54 plFmts[5] = new PluralFormat(ULocale.getDefault(), PluralRules.DEFAULT); in TestConstructor()
57 PluralRules.DEFAULT, in TestConstructor()
64 plFmts[9] = new PluralFormat(Locale.getDefault(), PluralRules.DEFAULT); in TestConstructor()
107 PluralRules oddAndEven = PluralRules.createRules("odd: n mod 2 is 1"); in TestApplyPatternAndFormat()
217 for (ULocale locale : PluralRules.getAvailableULocales()) { in TestSamples()
[all …]
/external/icu/android_icu4j/src/main/tests/android/icu/dev/test/format/
DPluralRulesTest.java53 import android.icu.text.PluralRules;
54 import android.icu.text.PluralRules.FixedDecimal;
55 import android.icu.text.PluralRules.FixedDecimalRange;
56 import android.icu.text.PluralRules.FixedDecimalSamples;
57 import android.icu.text.PluralRules.KeywordStatus;
58 import android.icu.text.PluralRules.PluralType;
59 import android.icu.text.PluralRules.SampleType;
98 PluralRules rules = factory.forLocale(locale); in testOverUnderflow()
169 PluralRules.parseDescription(rules); in testSyntaxRestrictions()
180 PluralRules test = PluralRules.createRules(description);
[all …]
DPluralRulesFactory.java12 import android.icu.text.PluralRules;
13 import android.icu.text.PluralRules.PluralType;
20 public abstract class PluralRulesFactory extends PluralRules.Factory {
32 public PluralRules forLocale(ULocale locale, PluralType ordinal) { in forLocale()
33 return PluralRules.forLocale(locale, ordinal); in forLocale()
37 return PluralRules.getAvailableULocales(); in getAvailableULocales()
41 return PluralRules.getFunctionalEquivalent(locale, isAvailable); in getFunctionalEquivalent()
DPluralFormatUnitTest.java32 import android.icu.text.PluralRules;
33 import android.icu.text.PluralRules.PluralType;
34 import android.icu.text.PluralRules.SampleType;
51 plFmts[1] = new PluralFormat(PluralRules.DEFAULT); in TestConstructor()
53 plFmts[2] = new PluralFormat(PluralRules.DEFAULT, "other{#}"); in TestConstructor()
57 plFmts[5] = new PluralFormat(ULocale.getDefault(), PluralRules.DEFAULT); in TestConstructor()
60 PluralRules.DEFAULT, in TestConstructor()
67 plFmts[9] = new PluralFormat(Locale.getDefault(), PluralRules.DEFAULT); in TestConstructor()
110 PluralRules oddAndEven = PluralRules.createRules("odd: n mod 2 is 1"); in TestApplyPatternAndFormat()
220 for (ULocale locale : PluralRules.getAvailableULocales()) { in TestSamples()
[all …]
/external/icu/icu4c/source/test/intltest/
Dplurults.cpp39 UBool checkEqual(const PluralRules &test, char *result, int32_t max);
40 UBool testEquality(const PluralRules &test);
141 PluralRules defRule(status); in testAPI()
142 LocalPointer<PluralRules> test(new PluralRules(status), status); in testAPI()
147 LocalPointer<PluralRules> newEnPlural(test->forLocale(Locale::getEnglish(), status), status); in testAPI()
154 LocalPointer<PluralRules> dupRule(defRule.clone()); in testAPI()
173 LocalPointer<PluralRules> empRule(test->createRules(UNICODE_STRING_SIMPLE("a:n"), status)); in testAPI()
189 LocalPointer<PluralRules> newRules(test->createRules(pluralTestData[i], status)); in testAPI()
218 LocalPointer<PluralRules> newRules(test->createRules(complexRule, status)); in testAPI()
259 if(test->getDynamicClassID() != PluralRules::getStaticClassID()) { in testAPI()
[all …]
/external/icu/libicu/cts_headers/unicode/
Dplurrule.h206 class U_I18N_API PluralRules : public UObject {
216 PluralRules(UErrorCode& status);
222 PluralRules(const PluralRules& other);
228 virtual ~PluralRules();
234 PluralRules* clone() const;
240 PluralRules& operator=(const PluralRules&);
252 static PluralRules* U_EXPORT2 createRules(const UnicodeString& description,
263 static PluralRules* U_EXPORT2 createDefaultRules(UErrorCode& status);
281 static PluralRules* U_EXPORT2 forLocale(const Locale& locale, UErrorCode& status);
299 …static PluralRules* U_EXPORT2 forLocale(const Locale& locale, UPluralType type, UErrorCode& status…
[all …]
Dplurfmt.h181 PluralFormat(const PluralRules& rules, UErrorCode& status);
199 PluralFormat(const Locale& locale, const PluralRules& rules, UErrorCode& status);
252 PluralFormat(const PluralRules& rules,
271 const PluralRules& rules,
555 PluralRules* pluralRules;
565 void init(const PluralRules* rules, UPluralType type, UErrorCode& status);
/external/icu/icu4c/source/i18n/unicode/
Dplurrule.h206 class U_I18N_API PluralRules : public UObject {
216 PluralRules(UErrorCode& status);
222 PluralRules(const PluralRules& other);
228 virtual ~PluralRules();
234 PluralRules* clone() const;
240 PluralRules& operator=(const PluralRules&);
252 static PluralRules* U_EXPORT2 createRules(const UnicodeString& description,
263 static PluralRules* U_EXPORT2 createDefaultRules(UErrorCode& status);
281 static PluralRules* U_EXPORT2 forLocale(const Locale& locale, UErrorCode& status);
299 …static PluralRules* U_EXPORT2 forLocale(const Locale& locale, UPluralType type, UErrorCode& status…
[all …]
Dplurfmt.h181 PluralFormat(const PluralRules& rules, UErrorCode& status);
199 PluralFormat(const Locale& locale, const PluralRules& rules, UErrorCode& status);
252 PluralFormat(const PluralRules& rules,
271 const PluralRules& rules,
555 PluralRules* pluralRules;
565 void init(const PluralRules* rules, UPluralType type, UErrorCode& status);
/external/cldr/tools/java/org/unicode/cldr/tool/
DWritePluralRules.java18 import com.ibm.icu.text.PluralRules;
23 private static final Comparator<PluralRules> PLURAL_RULES_COMPARATOR =
24 Comparator.<PluralRules, Integer>comparing(r -> r.getKeywords().size())
25 .thenComparing(PluralRules::getKeywords,
32 Relation<PluralRules, String> rulesToLocales = in main()
38 PluralRules rules = forLocale(locale); in main()
47 TreeSet<Entry<PluralRules, Set<String>>> sorted = new TreeSet<>(new HackComparator()); in main()
49 for (Entry<PluralRules, Set<String>> entry : sorted) { in main()
50 PluralRules rules = entry.getKey(); in main()
84 PluralRules rules = PluralRules.createRules(keyword + ":" + rule); in formatPluralRule()
[all …]
DGeneratePluralConfirmation.java23 import com.ibm.icu.text.PluralRules;
24 import com.ibm.icu.text.PluralRules.FixedDecimal;
25 import com.ibm.icu.text.PluralRules.FixedDecimalRange;
26 import com.ibm.icu.text.PluralRules.FixedDecimalSamples;
29 …private static final com.ibm.icu.text.PluralRules.PluralType ICU_ORDINAL = com.ibm.icu.text.Plural…
41 for (PluralRules.PluralType type : PluralRules.PluralType.values()) { in main()
51 + (type == PluralRules.PluralType.CARDINAL ? "plural" : "ordinal") in main()
53 + (type == PluralRules.PluralType.CARDINAL ? "count" : "ordinal") in main()
120 PluralRules rules; in mainOld()
122 rules = PluralRules.DEFAULT; in mainOld()
[all …]
DPluralRulesFactory.java19 import com.ibm.icu.text.PluralRules;
20 import com.ibm.icu.text.PluralRules.FixedDecimal;
21 import com.ibm.icu.text.PluralRules.PluralType;
28 public abstract class PluralRulesFactory extends PluralRules.Factory {
82 public PluralRules forLocale(ULocale locale, PluralType ordinal) { in forLocale()
83 return PluralRules.forLocale(locale, ordinal); in forLocale()
88 return PluralRules.getAvailableULocales(); in getAvailableULocales()
93 return PluralRules.getFunctionalEquivalent(locale, isAvailable); in getFunctionalEquivalent()
289 tempSamples.put(uLocale, new PluralRules.FixedDecimal(item)); in loadData()
DWritePluralRulesSpreadsheets.java27 import com.ibm.icu.text.PluralRules;
28 import com.ibm.icu.text.PluralRules.FixedDecimal;
29 import com.ibm.icu.text.PluralRules.FixedDecimalRange;
30 import com.ibm.icu.text.PluralRules.FixedDecimalSamples;
31 import com.ibm.icu.text.PluralRules.PluralType;
32 import com.ibm.icu.text.PluralRules.SampleType;
110 PluralRules rules = supplemental.getPlurals(locale).getPluralRules(); in writePluralChecklist()
170 PluralRules rules = supplemental.getPlurals(locale).getPluralRules(); in writeRanges()
226 private static FixedDecimal getSample(PluralRules rules, String start, FixedDecimal minimum) { in getSample()
235 …private static FixedDecimal getSample(PluralRules rules, String start, SampleType sampleType, Fixe… in getSample()
/external/icu/icu4c/source/i18n/
Dupluralrules.cpp41 UnicodeString select(const PluralRules &rules, const Formattable& obj, const NumberFormat& fmt, UEr… in select()
71 return (UPluralRules*)PluralRules::forLocale(Locale(locale), type, *status); in uplrules_openForType()
77 delete (PluralRules*)uplrules; in uplrules_close()
93 UnicodeString result = ((PluralRules*)uplrules)->select(number); in uplrules_select()
115 UnicodeString result = ((PluralRules*)uplrules)->select(*dq); in uplrules_selectFormatted()
134 UnicodeString result = ((PluralRules*)uplrules)->select(impl, *status); in uplrules_selectForRange()
148 const PluralRules* plrules = reinterpret_cast<const PluralRules*>(uplrules); in uplrules_selectWithFormat()
166 const PluralRules* plrules = reinterpret_cast<const PluralRules*>(uplrules); in uplrules_getKeywords()
Dsharedpluralrules.h19 class PluralRules; variable
23 SharedPluralRules(PluralRules *prToAdopt) : ptr(prToAdopt) { } in SharedPluralRules()
25 const PluralRules *operator->() const { return ptr; }
26 const PluralRules &operator*() const { return *ptr; }
28 PluralRules *ptr;
Dnumber_longnames.h35 forCurrencyLongNames(const Locale &loc, const CurrencyUnit &currency, const PluralRules *rules,
60 const UNumberUnitWidth &width, const PluralRules *rules,
81 const PluralRules *rules;
85 LongNameHandler(const PluralRules *rules, const MicroPropsGenerator *parent) in LongNameHandler()
103 const UNumberUnitWidth &width, const PluralRules *rules,
139 const UNumberUnitWidth &width, const PluralRules *rules,
158 const PluralRules *rules;
176 MixedUnitLongNameHandler(const PluralRules *rules, const MicroPropsGenerator *parent) in MixedUnitLongNameHandler()
210 … const UNumberUnitWidth &width, const PluralRules *rules,
Dplurrule.cpp68 UOBJECT_DEFINE_RTTI_IMPLEMENTATION(PluralRules)
71 PluralRules::PluralRules(UErrorCode& /*status*/) in UOBJECT_DEFINE_RTTI_IMPLEMENTATION()
79 PluralRules::PluralRules(const PluralRules& other) in PluralRules() function in PluralRules
88 PluralRules::~PluralRules() { in ~PluralRules()
97 PluralRules*
98 PluralRules::clone() const { in clone()
105 PluralRules*
106 PluralRules::clone(UErrorCode& status) const { in clone()
107 LocalPointer<PluralRules> newObj(new PluralRules(*this), status); in clone()
115 PluralRules&
[all …]
/external/icu/android_icu4j/src/main/java/android/icu/impl/
DPluralRulesLoader.java23 import android.icu.text.PluralRules;
24 import android.icu.text.PluralRules.PluralType;
32 public class PluralRulesLoader extends PluralRules.Factory {
34 private final Map<String, PluralRules> pluralRulesCache;
45 pluralRulesCache = new HashMap<String, PluralRules>(); in PluralRulesLoader()
184 public PluralRules getOrCreateRulesForLocale(ULocale locale, PluralRules.PluralType type) { in getOrCreateRulesForLocale()
192 PluralRules rules = null; in getOrCreateRulesForLocale()
217 rules = PluralRules.newInternal(sb.toString(), ranges); in getOrCreateRulesForLocale()
246 public PluralRules forLocale(ULocale locale, PluralRules.PluralType type) { in forLocale()
247 PluralRules rules = getOrCreateRulesForLocale(locale, type); in forLocale()
[all …]
/external/icu/libicu/cts_headers/
Dsharedpluralrules.h19 class PluralRules; variable
23 SharedPluralRules(PluralRules *prToAdopt) : ptr(prToAdopt) { } in SharedPluralRules()
25 const PluralRules *operator->() const { return ptr; }
26 const PluralRules &operator*() const { return *ptr; }
28 PluralRules *ptr;
Dnumber_longnames.h35 forCurrencyLongNames(const Locale &loc, const CurrencyUnit &currency, const PluralRules *rules,
60 const UNumberUnitWidth &width, const PluralRules *rules,
81 const PluralRules *rules;
85 LongNameHandler(const PluralRules *rules, const MicroPropsGenerator *parent) in LongNameHandler()
103 const UNumberUnitWidth &width, const PluralRules *rules,
139 const UNumberUnitWidth &width, const PluralRules *rules,
158 const PluralRules *rules;
176 MixedUnitLongNameHandler(const PluralRules *rules, const MicroPropsGenerator *parent) in MixedUnitLongNameHandler()
210 … const UNumberUnitWidth &width, const PluralRules *rules,
Dquantityformatter.h25 class PluralRules; variable
108 const PluralRules &rules,
120 const PluralRules &rules,
141 const PluralRules& rules,
/external/icu/icu4j/main/classes/core/src/com/ibm/icu/impl/
DPluralRulesLoader.java22 import com.ibm.icu.text.PluralRules;
23 import com.ibm.icu.text.PluralRules.PluralType;
30 public class PluralRulesLoader extends PluralRules.Factory {
32 private final Map<String, PluralRules> pluralRulesCache;
43 pluralRulesCache = new HashMap<String, PluralRules>(); in PluralRulesLoader()
182 public PluralRules getOrCreateRulesForLocale(ULocale locale, PluralRules.PluralType type) { in getOrCreateRulesForLocale()
190 PluralRules rules = null; in getOrCreateRulesForLocale()
215 rules = PluralRules.newInternal(sb.toString(), ranges); in getOrCreateRulesForLocale()
244 public PluralRules forLocale(ULocale locale, PluralRules.PluralType type) { in forLocale()
245 PluralRules rules = getOrCreateRulesForLocale(locale, type); in forLocale()
[all …]
/external/cldr/tools/cldr-unittest/src/org/unicode/cldr/unittest/
DTestPluralRuleGeneration.java27 import com.ibm.icu.text.PluralRules;
28 import com.ibm.icu.text.PluralRules.IFixedDecimal;
29 import com.ibm.icu.text.PluralRules.Operand;
30 import com.ibm.icu.text.PluralRules.SampleType;
48 PluralRules rules = PluralRules.createRules("one:i = 0 or n = 1"); in TestGeneration()
62 PluralRules rules = PluralRules in TestFilipino()
72 Set<PluralRules> seen = new HashSet(); in TestAtoms()
81 PluralRules rules = info.getPluralRules(); in TestAtoms()
94 PluralRules rules2 = PluralRules in TestAtoms()
114 PluralRules test; in TestEFixedDecimal()
[all …]

1234567