Home
last modified time | relevance | path

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

123456

/external/icu/android_icu4j/src/main/tests/android/icu/dev/test/format/
DPluralRulesTest.java46 import android.icu.text.PluralRules;
47 import android.icu.text.PluralRules.FixedDecimal;
48 import android.icu.text.PluralRules.FixedDecimalRange;
49 import android.icu.text.PluralRules.FixedDecimalSamples;
50 import android.icu.text.PluralRules.KeywordStatus;
51 import android.icu.text.PluralRules.PluralType;
52 import android.icu.text.PluralRules.SampleType;
91 PluralRules rules = factory.forLocale(locale); in testOverUnderflow()
162 PluralRules.parseDescription(rules); in testSyntaxRestrictions()
173 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/icu4j/main/tests/core/src/com/ibm/icu/dev/test/format/
DPluralRulesTest.java45 import com.ibm.icu.text.PluralRules;
46 import com.ibm.icu.text.PluralRules.FixedDecimal;
47 import com.ibm.icu.text.PluralRules.FixedDecimalRange;
48 import com.ibm.icu.text.PluralRules.FixedDecimalSamples;
49 import com.ibm.icu.text.PluralRules.KeywordStatus;
50 import com.ibm.icu.text.PluralRules.PluralType;
51 import com.ibm.icu.text.PluralRules.SampleType;
88 PluralRules rules = factory.forLocale(locale); in testOverUnderflow()
159 PluralRules.parseDescription(rules); in testSyntaxRestrictions()
170 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/icu4c/source/test/intltest/
Dplurults.cpp35 UBool checkEqual(const PluralRules &test, char *result, int32_t max);
36 UBool testEquality(const PluralRules &test);
131 PluralRules defRule(status); in testAPI()
132 LocalPointer<PluralRules> test(new PluralRules(status), status); in testAPI()
137 LocalPointer<PluralRules> newEnPlural(test->forLocale(Locale::getEnglish(), status), status); in testAPI()
144 LocalPointer<PluralRules> dupRule(defRule.clone()); in testAPI()
163 LocalPointer<PluralRules> empRule(test->createRules(UNICODE_STRING_SIMPLE("a:n"), status)); in testAPI()
179 LocalPointer<PluralRules> newRules(test->createRules(pluralTestData[i], status)); in testAPI()
208 LocalPointer<PluralRules> newRules(test->createRules(complexRule, status)); in testAPI()
249 if(test->getDynamicClassID() != PluralRules::getStaticClassID()) { in testAPI()
[all …]
/external/icu/icu4c/source/i18n/unicode/
Dplurrule.h194 class U_I18N_API PluralRules : public UObject {
204 PluralRules(UErrorCode& status);
210 PluralRules(const PluralRules& other);
216 virtual ~PluralRules();
222 PluralRules* clone() const;
228 PluralRules& operator=(const PluralRules&);
240 static PluralRules* U_EXPORT2 createRules(const UnicodeString& description,
251 static PluralRules* U_EXPORT2 createDefaultRules(UErrorCode& status);
269 static PluralRules* U_EXPORT2 forLocale(const Locale& locale, UErrorCode& status);
287 …static PluralRules* U_EXPORT2 forLocale(const Locale& locale, UPluralType type, UErrorCode& status…
[all …]
Dplurfmt.h179 PluralFormat(const PluralRules& rules, UErrorCode& status);
197 PluralFormat(const Locale& locale, const PluralRules& rules, UErrorCode& status);
250 PluralFormat(const PluralRules& rules,
269 const PluralRules& rules,
556 PluralRules* pluralRules;
566 void init(const PluralRules* rules, UPluralType type, UErrorCode& status);
/external/cldr/tools/java/org/unicode/cldr/tool/
DWritePluralRules.java17 import com.ibm.icu.text.PluralRules;
23 …Relation<PluralRules, String> rulesToLocales = Relation.of(new TreeMap<PluralRules, Set<String>>(n… in main()
28 PluralRules rules = forLocale(locale); in main()
37 …TreeSet<Entry<PluralRules, Set<String>>> sorted = new TreeSet<Entry<PluralRules, Set<String>>>(new… in main()
39 for (Entry<PluralRules, Set<String>> entry : sorted) { in main()
40 PluralRules rules = entry.getKey(); in main()
74 PluralRules rules = PluralRules.createRules(keyword + ":" + rule); in formatPluralRule()
126 static class HackComparator implements Comparator<Entry<PluralRules, Set<String>>> {
131 public int compare(Entry<PluralRules, Set<String>> o1, Entry<PluralRules, Set<String>> o2) { in compare() argument
161 static class PluralRulesComparator implements Comparator<PluralRules> {
[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 {
81 public PluralRules forLocale(ULocale locale, PluralType ordinal) { in forLocale()
82 return PluralRules.forLocale(locale, ordinal); in forLocale()
87 return PluralRules.getAvailableULocales(); in getAvailableULocales()
92 return PluralRules.getFunctionalEquivalent(locale, isAvailable); in getFunctionalEquivalent()
288 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()
218 private static FixedDecimal getSample(PluralRules rules, String start, FixedDecimal minimum) { in getSample()
227 …private static FixedDecimal getSample(PluralRules rules, String start, SampleType sampleType, Fixe… in getSample()
DGeneratedPluralSamples.java30 import com.ibm.icu.text.PluralRules;
31 import com.ibm.icu.text.PluralRules.FixedDecimal;
258 final PluralRules.SampleType sampleType;
261 public DataSample(PluralRules.SampleType sampleType) {
303 public void freeze(String keyword, PluralRules rule) {
316 public boolean computeBoundedWithSize(String keyword, PluralRules rule) {
350 private final PluralRules rules; // for debugging
351 private final DataSample integers = new DataSample(PluralRules.SampleType.INTEGER);
352 private final DataSample decimals = new DataSample(PluralRules.SampleType.DECIMAL);
355 DataSamples(String keyword, PluralRules rules) {
[all …]
/external/cldr/tools/cldr-unittest/src/org/unicode/cldr/unittest/
DTestPluralRuleGeneration.java12 import com.ibm.icu.text.PluralRules;
13 import com.ibm.icu.text.PluralRules.SampleType;
28 PluralRules rules = PluralRules.createRules("one:i = 0 or n = 1"); in TestGeneration()
42 PluralRules rules = PluralRules in TestFilipino()
52 Set<PluralRules> seen = new HashSet(); in TestAtoms()
61 PluralRules rules = info.getPluralRules(); in TestAtoms()
74 PluralRules rules2 = PluralRules in TestAtoms()
/external/icu/icu4c/source/i18n/
Dupluralrules.cpp38 UnicodeString select(const PluralRules &rules, const Formattable& obj, const NumberFormat& fmt, UEr… in select()
68 return (UPluralRules*)PluralRules::forLocale(Locale(locale), type, *status); in uplrules_openForType()
74 delete (PluralRules*)uplrules; in uplrules_close()
90 UnicodeString result = ((PluralRules*)uplrules)->select(number); in uplrules_select()
104 const PluralRules* plrules = reinterpret_cast<const PluralRules*>(uplrules); in uplrules_selectWithFormat()
122 const PluralRules* plrules = reinterpret_cast<const PluralRules*>(uplrules); in uplrules_getKeywords()
Dplurrule.cpp63 UOBJECT_DEFINE_RTTI_IMPLEMENTATION(PluralRules)
66 PluralRules::PluralRules(UErrorCode& /*status*/) in UOBJECT_DEFINE_RTTI_IMPLEMENTATION()
73 PluralRules::PluralRules(const PluralRules& other) in PluralRules() function in PluralRules
81 PluralRules::~PluralRules() { in ~PluralRules()
89 PluralRules*
90 PluralRules::clone() const { in clone()
91 PluralRules* newObj = new PluralRules(*this); in clone()
101 PluralRules&
102 PluralRules::operator=(const PluralRules& other) { in operator =()
125 StringEnumeration* PluralRules::getAvailableLocales(UErrorCode &status) { in getAvailableLocales()
[all …]
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.h20 forCurrencyLongNames(const Locale &loc, const CurrencyUnit &currency, const PluralRules *rules,
25 const UNumberUnitWidth &width, const PluralRules *rules,
35 const PluralRules *rules;
38 LongNameHandler(const PluralRules *rules, const MicroPropsGenerator *parent) in LongNameHandler()
43 const UNumberUnitWidth &width, const PluralRules *rules,
/external/icu/android_icu4j/src/main/java/android/icu/impl/
DPluralRulesLoader.java22 import android.icu.text.PluralRules;
23 import android.icu.text.PluralRules.PluralType;
31 public class PluralRulesLoader extends PluralRules.Factory {
32 private final Map<String, PluralRules> rulesIdToRules;
44 rulesIdToRules = new HashMap<String, PluralRules>(); in PluralRulesLoader()
184 public PluralRules getRulesForRulesId(String rulesId) { in getRulesForRulesId()
186 PluralRules rules = null; in getRulesForRulesId()
210 rules = PluralRules.parseDescription(sb.toString()); in getRulesForRulesId()
239 public PluralRules forLocale(ULocale locale, PluralRules.PluralType type) { in forLocale()
242 return PluralRules.DEFAULT; in forLocale()
[all …]
/external/icu/icu4j/main/classes/core/src/com/ibm/icu/impl/
DPluralRulesLoader.java21 import com.ibm.icu.text.PluralRules;
22 import com.ibm.icu.text.PluralRules.PluralType;
29 public class PluralRulesLoader extends PluralRules.Factory {
30 private final Map<String, PluralRules> rulesIdToRules;
42 rulesIdToRules = new HashMap<String, PluralRules>(); in PluralRulesLoader()
182 public PluralRules getRulesForRulesId(String rulesId) { in getRulesForRulesId()
184 PluralRules rules = null; in getRulesForRulesId()
208 rules = PluralRules.parseDescription(sb.toString()); in getRulesForRulesId()
237 public PluralRules forLocale(ULocale locale, PluralRules.PluralType type) { in forLocale()
240 return PluralRules.DEFAULT; in forLocale()
[all …]
/external/v8/src/objects/
Djs-plural-rules.cc27 std::unique_ptr<icu::PluralRules>* pl, in CreateICUPluralRules()
40 std::unique_ptr<icu::PluralRules> plural_rules( in CreateICUPluralRules()
41 icu::PluralRules::forLocale(icu_locale, type, status)); in CreateICUPluralRules()
63 std::unique_ptr<icu::PluralRules>* plural_rules, in InitializeICUPluralRules()
166 std::unique_ptr<icu::PluralRules> icu_plural_rules; in InitializePluralRules()
178 Handle<Managed<icu::PluralRules>> managed_plural_rules = in InitializePluralRules()
179 Managed<icu::PluralRules>::FromUniquePtr(isolate, 0, in InitializePluralRules()
195 icu::PluralRules* icu_plural_rules = plural_rules->icu_plural_rules()->raw(); in ResolvePlural()
292 icu::PluralRules* icu_plural_rules = plural_rules->icu_plural_rules()->raw(); in ResolvedOptions()
/external/icu/android_icu4j/src/main/java/android/icu/text/
DPluralFormat.java23 import android.icu.text.PluralRules.FixedDecimal;
24 import android.icu.text.PluralRules.IFixedDecimal;
25 import android.icu.text.PluralRules.PluralType;
149 private PluralRules pluralRules = null;
221 public PluralFormat(PluralRules rules) { in PluralFormat()
233 public PluralFormat(ULocale ulocale, PluralRules rules) { in PluralFormat()
245 public PluralFormat(Locale locale, PluralRules rules) { in PluralFormat()
311 public PluralFormat(PluralRules rules, String pattern) { in PluralFormat()
327 public PluralFormat(ULocale ulocale, PluralRules rules, String pattern) { in PluralFormat()
376 … private void init(PluralRules rules, PluralType type, ULocale locale, NumberFormat numberFormat) { in init()
[all …]
/external/icu/icu4j/main/classes/core/src/com/ibm/icu/text/
DPluralFormat.java22 import com.ibm.icu.text.PluralRules.FixedDecimal;
23 import com.ibm.icu.text.PluralRules.IFixedDecimal;
24 import com.ibm.icu.text.PluralRules.PluralType;
149 private PluralRules pluralRules = null;
225 public PluralFormat(PluralRules rules) { in PluralFormat()
238 public PluralFormat(ULocale ulocale, PluralRules rules) { in PluralFormat()
251 public PluralFormat(Locale locale, PluralRules rules) { in PluralFormat()
322 public PluralFormat(PluralRules rules, String pattern) { in PluralFormat()
339 public PluralFormat(ULocale ulocale, PluralRules rules, String pattern) { in PluralFormat()
389 … private void init(PluralRules rules, PluralType type, ULocale locale, NumberFormat numberFormat) { in init()
[all …]
DCurrencyPluralInfo.java108 public PluralRules getPluralRules() { in getPluralRules()
158 pluralRules = PluralRules.createRules(ruleDescription); in setPluralRules()
261 public String select(PluralRules.FixedDecimal numberInfo) { in select()
279 pluralRules = PluralRules.forLocale(uloc); in initialize()
340 private PluralRules pluralRules = null;

123456