Home
last modified time | relevance | path

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

123

/external/icu/icu4j/main/tests/core/src/com/ibm/icu/dev/test/format/
DPluralRulesTest.java39 import com.ibm.icu.text.PluralRules;
40 import com.ibm.icu.text.PluralRules.FixedDecimal;
41 import com.ibm.icu.text.PluralRules.FixedDecimalRange;
42 import com.ibm.icu.text.PluralRules.FixedDecimalSamples;
43 import com.ibm.icu.text.PluralRules.KeywordStatus;
44 import com.ibm.icu.text.PluralRules.PluralType;
45 import com.ibm.icu.text.PluralRules.SampleType;
84 PluralRules rules = factory.forLocale(locale); in testOverUnderflow()
154 PluralRules.parseDescription(rules); in testSyntaxRestrictions()
164 PluralRules test = PluralRules.createRules(description);
[all …]
DPluralRulesFactory.java9 import com.ibm.icu.text.PluralRules;
10 import com.ibm.icu.text.PluralRules.PluralType;
17 public abstract class PluralRulesFactory extends PluralRules.Factory {
29 public PluralRules forLocale(ULocale locale, PluralType ordinal) { in forLocale()
30 return PluralRules.forLocale(locale, ordinal); in forLocale()
34 return PluralRules.getAvailableULocales(); in getAvailableULocales()
38 return PluralRules.getFunctionalEquivalent(locale, isAvailable); in getFunctionalEquivalent()
DPluralFormatUnitTest.java24 import com.ibm.icu.text.PluralRules;
25 import com.ibm.icu.text.PluralRules.PluralType;
26 import com.ibm.icu.text.PluralRules.SampleType;
43 plFmts[1] = new PluralFormat(PluralRules.DEFAULT); in TestConstructor()
45 plFmts[2] = new PluralFormat(PluralRules.DEFAULT, "other{#}"); in TestConstructor()
49 plFmts[5] = new PluralFormat(ULocale.getDefault(), PluralRules.DEFAULT); in TestConstructor()
52 PluralRules.DEFAULT, in TestConstructor()
59 plFmts[9] = new PluralFormat(Locale.getDefault(), PluralRules.DEFAULT); in TestConstructor()
84 PluralRules oddAndEven = PluralRules.createRules("odd: n mod 2 is 1"); in TestApplyPatternAndFormat()
193 for (ULocale locale : PluralRules.getAvailableULocales()) { in TestSamples()
[all …]
/external/icu/icu4c/source/test/intltest/
Dplurults.cpp31 UBool checkEqual(const PluralRules &test, char *result, int32_t max);
32 UBool testEquality(const PluralRules &test);
127 PluralRules defRule(status); in testAPI()
128 LocalPointer<PluralRules> test(new PluralRules(status), status); in testAPI()
133 LocalPointer<PluralRules> newEnPlural(test->forLocale(Locale::getEnglish(), status), status); in testAPI()
140 LocalPointer<PluralRules> dupRule(defRule.clone()); in testAPI()
159 LocalPointer<PluralRules> empRule(test->createRules(UNICODE_STRING_SIMPLE("a:n"), status)); in testAPI()
175 LocalPointer<PluralRules> newRules(test->createRules(pluralTestData[i], status)); in testAPI()
204 LocalPointer<PluralRules> newRules(test->createRules(complexRule, status)); in testAPI()
245 if(test->getDynamicClassID() != PluralRules::getStaticClassID()) { in testAPI()
[all …]
Dquantityformattertest.cpp116 LocalPointer<PluralRules> plurrule( in TestBasic()
117 PluralRules::forLocale("en", status)); in TestBasic()
/external/icu/icu4c/source/i18n/unicode/
Dplurrule.h191 class U_I18N_API PluralRules : public UObject {
201 PluralRules(UErrorCode& status);
207 PluralRules(const PluralRules& other);
213 virtual ~PluralRules();
219 PluralRules* clone() const;
225 PluralRules& operator=(const PluralRules&);
237 static PluralRules* U_EXPORT2 createRules(const UnicodeString& description,
248 static PluralRules* U_EXPORT2 createDefaultRules(UErrorCode& status);
266 static PluralRules* U_EXPORT2 forLocale(const Locale& locale, UErrorCode& status);
284 …static PluralRules* U_EXPORT2 forLocale(const Locale& locale, UPluralType type, UErrorCode& status…
[all …]
Dplurfmt.h177 PluralFormat(const PluralRules& rules, UErrorCode& status);
195 PluralFormat(const Locale& locale, const PluralRules& rules, UErrorCode& status);
248 PluralFormat(const PluralRules& rules,
267 const PluralRules& rules,
562 PluralRules* pluralRules;
576 void init(const PluralRules* rules, UPluralType type, UErrorCode& status);
Dcurrpinf.h24 class PluralRules; variable
116 const PluralRules* getPluralRules() const;
243 PluralRules* fPluralRules;
Dcompactdecimalformat.h28 class PluralRules; variable
317 PluralRules* _pluralRules;
320 …cimalFormat &, const UHashtable* unitsByVariant, const double* divisors, PluralRules* pluralRules);
/external/messageformat/java/com/ibm/icu/simple/
DPluralRulesLoader.java18 import com.ibm.icu.simple.PluralRules.PluralType;
23 public class PluralRulesLoader extends PluralRules.Factory {
28 private final Map<String, PluralRules> rulesIdToRules;
37 rulesIdToRules = new HashMap<String, PluralRules>(); in PluralRulesLoader()
114 public PluralRules getRulesForRulesId(String rulesId) { in getRulesForRulesId()
116 PluralRules rules = null; in getRulesForRulesId()
145 rules = PluralRules.parseDescription(sb.toString()); in getRulesForRulesId()
164 public PluralRules forLocale(Locale locale, PluralRules.PluralType type) { in forLocale()
167 return PluralRules.DEFAULT; in forLocale()
169 PluralRules rules = getRulesForRulesId(rulesId); in forLocale()
[all …]
DPluralFormat.java17 import com.ibm.icu.simple.PluralRules.FixedDecimal;
18 import com.ibm.icu.simple.PluralRules.PluralType;
145 private PluralRules pluralRules = null;
226 private void init(PluralRules rules, PluralType type, Locale locale) { in init()
228 pluralRules = (rules == null) ? PluralRules.forLocale(locale, type) in init()
DPluralRules.java165 public class PluralRules implements Serializable { class
214 public abstract PluralRules forLocale(Locale locale, PluralType type); in forLocale()
224 public final PluralRules forLocale(Locale locale) { in forLocale()
369 public static PluralRules parseDescription(String description) in parseDescription()
373 return description.length() == 0 ? DEFAULT : new PluralRules(parseRuleChain(description)); in parseDescription()
383 public static PluralRules createRules(String description) { in createRules()
396 public static final PluralRules DEFAULT = new PluralRules(new RuleList().addRule(DEFAULT_RULE));
1864 public static PluralRules forLocale(Locale locale) { in forLocale()
1886 public static PluralRules forLocale(Locale locale, PluralType type) { in forLocale()
1910 private PluralRules(RuleList rules) { in PluralRules() method in PluralRules
[all …]
/external/icu/icu4c/source/i18n/
Dsharedpluralrules.h17 class PluralRules; variable
21 SharedPluralRules(PluralRules *prToAdopt) : ptr(prToAdopt) { } in SharedPluralRules()
23 const PluralRules *operator->() const { return ptr; }
24 const PluralRules &operator*() const { return *ptr; }
26 PluralRules *ptr;
Dplurrule.cpp58 UOBJECT_DEFINE_RTTI_IMPLEMENTATION(PluralRules)
61 PluralRules::PluralRules(UErrorCode& /*status*/) in UOBJECT_DEFINE_RTTI_IMPLEMENTATION()
67 PluralRules::PluralRules(const PluralRules& other) in PluralRules() function in PluralRules
74 PluralRules::~PluralRules() { in ~PluralRules()
82 PluralRules*
83 PluralRules::clone() const { in clone()
84 return new PluralRules(*this); in clone()
87 PluralRules&
88 PluralRules::operator=(const PluralRules& other) { in operator =()
102 StringEnumeration* PluralRules::getAvailableLocales(UErrorCode &status) { in getAvailableLocales()
[all …]
Dupluralrules.cpp29 return (UPluralRules*)PluralRules::forLocale(Locale(locale), type, *status); in uplrules_openForType()
35 delete (PluralRules*)uplrules; in uplrules_close()
51 UnicodeString result = ((PluralRules*)uplrules)->select(number); in uplrules_select()
Dquantityformatter.h21 class PluralRules; variable
106 const PluralRules &rules,
Dplurfmt.cpp49 PluralFormat::PluralFormat(const PluralRules& rules, UErrorCode& status) in PluralFormat()
58 const PluralRules& rules, in PluralFormat()
98 PluralFormat::PluralFormat(const PluralRules& rules, in PluralFormat()
110 const PluralRules& rules, in PluralFormat()
158 pluralRulesWrapper.pluralRules = PluralRules::forLocale(locale, status); in copyObjects()
170 PluralFormat::init(const PluralRules* rules, UPluralType type, UErrorCode& status) { in init()
176 pluralRulesWrapper.pluralRules = PluralRules::forLocale(locale, type, status); in init()
/external/icu/icu4j/main/classes/core/src/com/ibm/icu/impl/
DPluralRulesLoader.java19 import com.ibm.icu.text.PluralRules;
20 import com.ibm.icu.text.PluralRules.PluralType;
21 import com.ibm.icu.text.PluralRules.StandardPluralCategories;
28 public class PluralRulesLoader extends PluralRules.Factory {
29 private final Map<String, PluralRules> rulesIdToRules;
41 rulesIdToRules = new HashMap<String, PluralRules>(); in PluralRulesLoader()
181 public PluralRules getRulesForRulesId(String rulesId) { in getRulesForRulesId()
183 PluralRules rules = null; in getRulesForRulesId()
207 rules = PluralRules.parseDescription(sb.toString()); in getRulesForRulesId()
236 public PluralRules forLocale(ULocale locale, PluralRules.PluralType type) { in forLocale()
[all …]
/external/robolectric/src/main/java/com/xtremelabs/robolectric/res/
DPluralResourceLoader.java16 Map<String, PluralRules> plurals = new HashMap<String, PluralRules>();
26 PluralRules rules = plurals.get(name); in getValue()
39 PluralRules rules = new PluralRules(); in processNode()
58 static class PluralRules { class in PluralResourceLoader
/external/icu/icu4j/main/classes/core/src/com/ibm/icu/text/
DPluralFormat.java18 import com.ibm.icu.text.PluralRules.FixedDecimal;
19 import com.ibm.icu.text.PluralRules.PluralType;
147 private PluralRules pluralRules = null;
223 public PluralFormat(PluralRules rules) { in PluralFormat()
236 public PluralFormat(ULocale ulocale, PluralRules rules) { in PluralFormat()
250 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()
391 pluralRules = (rules == null) ? PluralRules.forLocale(ulocale, type) in init()
DCurrencyPluralInfo.java106 public PluralRules getPluralRules() { in getPluralRules()
156 pluralRules = PluralRules.createRules(ruleDescription); in setPluralRules()
253 String select(PluralRules.FixedDecimal numberInfo) { in select()
268 pluralRules = PluralRules.forLocale(uloc); in initialize()
329 private PluralRules pluralRules = null;
DPluralSamples.java22 import com.ibm.icu.text.PluralRules.FixedDecimal;
23 import com.ibm.icu.text.PluralRules.KeywordStatus;
24 import com.ibm.icu.text.PluralRules.StandardPluralCategories;
37 private PluralRules pluralRules;
54 public PluralSamples(PluralRules pluralRules) { in PluralSamples()
143 …private int addSimpleSamples(PluralRules pluralRules, final int MAX_SAMPLES, Map<String, List<Doub… in addSimpleSamples()
DPluralRules.java169 public class PluralRules implements Serializable { class
227 public abstract PluralRules forLocale(ULocale locale, PluralType type); in forLocale()
237 public final PluralRules forLocale(ULocale locale) { in forLocale()
382 public static PluralRules parseDescription(String description) in parseDescription()
386 return description.length() == 0 ? DEFAULT : new PluralRules(parseRuleChain(description)); in parseDescription()
396 public static PluralRules createRules(String description) { in createRules()
409 public static final PluralRules DEFAULT = new PluralRules(new RuleList().addRule(DEFAULT_RULE));
1888 public static PluralRules forLocale(ULocale locale) { in forLocale()
1911 public static PluralRules forLocale(Locale locale) { in forLocale()
1933 public static PluralRules forLocale(ULocale locale, PluralType type) { in forLocale()
[all …]
DQuantityFormatter.java119 public String format(double quantity, NumberFormat numberFormat, PluralRules pluralRules) { in format()
136 …private String computeVariant(double quantity, NumberFormat numberFormat, PluralRules pluralRules)… in computeVariant()
DCompactDecimalFormat.java27 import com.ibm.icu.text.PluralRules.FixedDecimal;
65 private final PluralRules pluralRules;
117 this.pluralRules = PluralRules.forLocale(locale); in CompactDecimalFormat()
163 CompactStyle style, PluralRules pluralRules, in CompactDecimalFormat()

123