/external/icu/icu4j/main/tests/core/src/com/ibm/icu/dev/test/format/ |
D | PluralRulesTest.java | 49 import com.ibm.icu.text.PluralRules; 50 import com.ibm.icu.text.PluralRules.FixedDecimal; 51 import com.ibm.icu.text.PluralRules.FixedDecimalRange; 52 import com.ibm.icu.text.PluralRules.FixedDecimalSamples; 53 import com.ibm.icu.text.PluralRules.KeywordStatus; 54 import com.ibm.icu.text.PluralRules.PluralType; 55 import com.ibm.icu.text.PluralRules.SampleType; 92 PluralRules rules = factory.forLocale(locale); in testOverUnderflow() 163 PluralRules.parseDescription(rules); in testSyntaxRestrictions() 174 PluralRules test = PluralRules.createRules(description); [all …]
|
D | PluralRulesFactory.java | 11 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()
|
D | PluralFormatUnitTest.java | 31 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/ |
D | PluralRulesTest.java | 50 import android.icu.text.PluralRules; 51 import android.icu.text.PluralRules.FixedDecimal; 52 import android.icu.text.PluralRules.FixedDecimalRange; 53 import android.icu.text.PluralRules.FixedDecimalSamples; 54 import android.icu.text.PluralRules.KeywordStatus; 55 import android.icu.text.PluralRules.PluralType; 56 import android.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 …]
|
D | PluralRulesFactory.java | 12 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()
|
D | PluralFormatUnitTest.java | 32 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/ |
D | plurults.cpp | 36 UBool checkEqual(const PluralRules &test, char *result, int32_t max); 37 UBool testEquality(const PluralRules &test); 134 PluralRules defRule(status); in testAPI() 135 LocalPointer<PluralRules> test(new PluralRules(status), status); in testAPI() 140 LocalPointer<PluralRules> newEnPlural(test->forLocale(Locale::getEnglish(), status), status); in testAPI() 147 LocalPointer<PluralRules> dupRule(defRule.clone()); in testAPI() 166 LocalPointer<PluralRules> empRule(test->createRules(UNICODE_STRING_SIMPLE("a:n"), status)); in testAPI() 182 LocalPointer<PluralRules> newRules(test->createRules(pluralTestData[i], status)); in testAPI() 211 LocalPointer<PluralRules> newRules(test->createRules(complexRule, status)); in testAPI() 252 if(test->getDynamicClassID() != PluralRules::getStaticClassID()) { in testAPI() [all …]
|
/external/icu/icu4c/source/i18n/unicode/ |
D | plurrule.h | 200 class U_I18N_API PluralRules : public UObject { 210 PluralRules(UErrorCode& status); 216 PluralRules(const PluralRules& other); 222 virtual ~PluralRules(); 228 PluralRules* clone() const; 234 PluralRules& operator=(const PluralRules&); 246 static PluralRules* U_EXPORT2 createRules(const UnicodeString& description, 257 static PluralRules* U_EXPORT2 createDefaultRules(UErrorCode& status); 275 static PluralRules* U_EXPORT2 forLocale(const Locale& locale, UErrorCode& status); 293 …static PluralRules* U_EXPORT2 forLocale(const Locale& locale, UPluralType type, UErrorCode& status… [all …]
|
D | plurfmt.h | 181 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/ |
D | WritePluralRules.java | 17 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 …]
|
D | GeneratePluralConfirmation.java | 23 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 …]
|
D | PluralRulesFactory.java | 19 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()
|
D | WritePluralRulesSpreadsheets.java | 27 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()
|
D | GeneratedPluralSamples.java | 30 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/ |
D | TestPluralRuleGeneration.java | 12 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/ |
D | upluralrules.cpp | 40 UnicodeString select(const PluralRules &rules, const Formattable& obj, const NumberFormat& fmt, UEr… in select() 70 return (UPluralRules*)PluralRules::forLocale(Locale(locale), type, *status); in uplrules_openForType() 76 delete (PluralRules*)uplrules; in uplrules_close() 92 UnicodeString result = ((PluralRules*)uplrules)->select(number); in uplrules_select() 114 UnicodeString result = ((PluralRules*)uplrules)->select(*dq); in uplrules_selectFormatted() 128 const PluralRules* plrules = reinterpret_cast<const PluralRules*>(uplrules); in uplrules_selectWithFormat() 146 const PluralRules* plrules = reinterpret_cast<const PluralRules*>(uplrules); in uplrules_getKeywords()
|
D | sharedpluralrules.h | 19 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;
|
D | plurrule.cpp | 64 UOBJECT_DEFINE_RTTI_IMPLEMENTATION(PluralRules) 67 PluralRules::PluralRules(UErrorCode& /*status*/) in UOBJECT_DEFINE_RTTI_IMPLEMENTATION() 74 PluralRules::PluralRules(const PluralRules& other) in PluralRules() function in PluralRules 82 PluralRules::~PluralRules() { in ~PluralRules() 90 PluralRules* 91 PluralRules::clone() const { in clone() 92 PluralRules* newObj = new PluralRules(*this); in clone() 102 PluralRules& 103 PluralRules::operator=(const PluralRules& other) { in operator =() 126 StringEnumeration* PluralRules::getAvailableLocales(UErrorCode &status) { in getAvailableLocales() [all …]
|
D | number_longnames.h | 33 forCurrencyLongNames(const Locale &loc, const CurrencyUnit ¤cy, const PluralRules *rules, 38 const UNumberUnitWidth &width, const PluralRules *rules, 48 const PluralRules *rules; 51 LongNameHandler(const PluralRules *rules, const MicroPropsGenerator *parent) in LongNameHandler() 56 const UNumberUnitWidth &width, const PluralRules *rules,
|
D | quantityformatter.h | 25 class PluralRules; variable 108 const PluralRules &rules, 120 const PluralRules &rules, 141 const PluralRules& rules,
|
/external/icu/android_icu4j/src/main/java/android/icu/impl/ |
D | PluralRulesLoader.java | 22 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/ |
D | PluralRulesLoader.java | 21 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/icu/icu4j/main/classes/core/src/com/ibm/icu/text/ |
D | PluralFormat.java | 22 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 …]
|
/external/icu/android_icu4j/src/main/java/android/icu/text/ |
D | PluralFormat.java | 23 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/v8/src/objects/ |
D | js-plural-rules.cc | 27 std::unique_ptr<icu::PluralRules>* pl) { in CreateICUPluralRules() 39 std::unique_ptr<icu::PluralRules> plural_rules( in CreateICUPluralRules() 40 icu::PluralRules::forLocale(icu_locale, icu_type, status)); in CreateICUPluralRules() 129 std::unique_ptr<icu::PluralRules> icu_plural_rules; in New() 155 Handle<Managed<icu::PluralRules>> managed_plural_rules = in New() 156 Managed<icu::PluralRules>::FromUniquePtr(isolate, 0, in New() 186 icu::PluralRules* icu_plural_rules = plural_rules->icu_plural_rules().raw(); in ResolvePlural() 265 icu::PluralRules* icu_plural_rules = plural_rules->icu_plural_rules().raw(); in ResolvedOptions() 304 icu::PluralRules::getAvailableLocales(status)); in PluralRulesAvailableLocales()
|