/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/text/ |
CollationKeyTest.java | 20 import java.text.Collator; 31 Collator collator = Collator.getInstance(); local 32 collator.setStrength(Collator.PRIMARY); 33 CollationKey key1 = collator.getCollationKey("abc"); 34 CollationKey key2 = collator.getCollationKey("ABC"); 44 Collator collator = Collator.getInstance() local 55 Collator collator = Collator.getInstance(); local 66 Collator collator = Collator.getInstance(); local 78 Collator collator = Collator.getInstance(); local 91 Collator collator = Collator.getInstance(); local [all...] |
/libcore/benchmarks/src/benchmarks/regression/ |
CollatorBenchmark.java | 19 import java.text.Collator; 25 private static final RuleBasedCollator collator = (RuleBasedCollator) field in class:CollatorBenchmark 26 Collator.getInstance(Locale.US); 29 collator.setStrength(Collator.PRIMARY); 31 collator.compare("abcde", "abcdf"); 32 collator.compare("abcde", "abcde"); 33 collator.compare("abcdf", "abcde"); 38 collator.setStrength(Collator.SECONDARY) [all...] |
/external/icu/android_icu4j/src/main/tests/android/icu/dev/test/collator/ |
CollationChineseTest.java | 16 package android.icu.dev.test.collator; 23 import android.icu.text.Collator; 37 RuleBasedCollator collator = null; local 39 collator = (RuleBasedCollator)Collator.getInstance( 42 warnln("ERROR: in creation of collator of zh__PINYIN locale"); 46 CollationTest.doTest(this, collator, seq[i], seq[i + 1], -1);
|
CollationThreadTest.java | 11 package android.icu.dev.test.collator; 18 import android.icu.text.Collator; 23 final Collator collator = Collator.getInstance(new Locale("pl", "", "")); external variable declarations 134 sort(temporaryData, collator); 147 private static void sort(String[] data, Collator collator) { 148 Arrays.sort(data, collator); 186 private Collator collator field in class:CollationThreadTest.Test [all...] |
CollationThaiTest.java | 16 package android.icu.dev.test.collator; 30 import android.icu.text.Collator; 85 warnln("could not construct Thai collator"); 119 * sorted order, and confirm that the collator compares each line as 128 warnln("could not construct Thai collator"); 223 RuleBasedCollator collator; local 226 collator = getThaiCollator(); 229 warnln("could not construct Thai collator"); 238 if (collator.compare(tests[i], tests[j]) > 0) { 245 = collator.getCollationElementIterator(tests[i]) 283 RuleBasedCollator collator; local 317 Collator collator; field in class:CollationThaiTest.StrCmp [all...] |
CollationAPITest.java | 16 package android.icu.dev.test.collator; 33 import android.icu.text.Collator; 34 import android.icu.text.Collator.CollatorFactory; 46 * - Collator.getCollationKey 54 Collator col = Collator.getInstance(); 55 col.setStrength(Collator.TERTIARY); 94 col = Collator.getInstance(); 96 errln("Collator.getInstance() failed"); 98 if (col.getStrength() != Collator.TERTIARY) 926 RuleBasedCollator collator = (RuleBasedCollator)Collator.getInstance(); local [all...] |
/libcore/luni/src/test/java/libcore/java/text/ |
OldCollationKeyTest.java | 20 import java.text.Collator; 29 Collator collator = Collator.getInstance(); local 30 collator.setStrength(Collator.PRIMARY); 31 CollationKey key1 = collator.getCollationKey("abc"); 35 collator = new RuleBasedCollator("&0 = 1 , 2 ; 3 , 4 < 5 ; 6 , 7"); 38 * ((RuleBasedCollator)collator).getCollationElementIterator("1234567"); 47 // bytes = collator.getCollationKey("1234567").toByteArray() [all...] |
CollatorTest.java | 21 import java.text.Collator; 29 Collator collator = Collator.getInstance(); local 30 collator.setStrength(Collator.PRIMARY); 31 assertEquals(Collator.PRIMARY, collator.getStrength()); 32 collator.setStrength(Collator.SECONDARY) [all...] |
/external/icu/icu4j/main/tests/collate/src/com/ibm/icu/dev/test/collator/ |
CollationChineseTest.java | 15 package com.ibm.icu.dev.test.collator; 22 import com.ibm.icu.text.Collator; 36 RuleBasedCollator collator = null; local 38 collator = (RuleBasedCollator)Collator.getInstance( 41 warnln("ERROR: in creation of collator of zh__PINYIN locale"); 45 CollationTest.doTest(this, collator, seq[i], seq[i + 1], -1);
|
CollationThreadTest.java | 10 package com.ibm.icu.dev.test.collator; 17 import com.ibm.icu.text.Collator; 22 final Collator collator = Collator.getInstance(new Locale("pl", "", "")); external variable declarations 133 sort(temporaryData, collator); 146 private static void sort(String[] data, Collator collator) { 147 Arrays.sort(data, collator); 185 private Collator collator field in class:CollationThreadTest.Test [all...] |
CollationThaiTest.java | 15 package com.ibm.icu.dev.test.collator; 29 import com.ibm.icu.text.Collator; 84 warnln("could not construct Thai collator"); 118 * sorted order, and confirm that the collator compares each line as 127 warnln("could not construct Thai collator"); 222 RuleBasedCollator collator; local 225 collator = getThaiCollator(); 228 warnln("could not construct Thai collator"); 237 if (collator.compare(tests[i], tests[j]) > 0) { 244 = collator.getCollationElementIterator(tests[i]) 282 RuleBasedCollator collator; local 316 Collator collator; field in class:CollationThaiTest.StrCmp [all...] |
CollationAPITest.java | 15 package com.ibm.icu.dev.test.collator; 32 import com.ibm.icu.text.Collator; 33 import com.ibm.icu.text.Collator.CollatorFactory; 45 * - Collator.getCollationKey 53 Collator col = Collator.getInstance(); 54 col.setStrength(Collator.TERTIARY); 93 col = Collator.getInstance(); 95 errln("Collator.getInstance() failed"); 97 if (col.getStrength() != Collator.TERTIARY) 925 RuleBasedCollator collator = (RuleBasedCollator)Collator.getInstance(); local [all...] |
/external/icu/icu4j/eclipse-build/plugins.template/com.ibm.icu.base/src/com/ibm/icu/text/ |
Collator.java | 18 * {@icuenhanced java.text.Collator}.{@icu _usage_} 20 * <p>Collator performs locale-sensitive string comparison. A concrete 69 * Unlike the JDK, ICU4J's Collator deals only with 2 decomposition modes, 71 * The compatibility decomposition mode, java.text.Collator.FULL_DECOMPOSITION 73 * decomposition mode is set, the Collator handles un-normalized text properly, 85 * // Get the Collator for US English and set its strength to PRIMARY 86 * Collator usCollator = Collator.getInstance(Locale.US); 87 * usCollator.setStrength(Collator.PRIMARY); 93 * Collator for the default locale 123 private final java.text.Collator collator; field in class:Collator [all...] |
/external/icu/icu4c/source/samples/coll/ |
coll.cpp | 60 UCollator * collator = 0; variable 149 UCollationResult result = ucol_strcoll(collator, source, -1, target, -1); 160 * Creates a collator 164 // Set up an ICU collator 170 collator = ucol_openRules(rules, -1, UCOL_OFF, UCOL_TERTIARY, 174 collator = ucol_open(opt_locale, &status); 177 fprintf(stderr, "Collator creation failed.: %d\n", status); 189 ucol_setAttribute(collator, UCOL_NORMALIZATION_MODE, UCOL_ON, &status); 192 ucol_setAttribute(collator, UCOL_FRENCH_COLLATION, UCOL_ON, &status); 195 ucol_setAttribute(collator, UCOL_CASE_FIRST, UCOL_LOWER_FIRST, [all...] |
/external/icu/icu4c/source/samples/strsrch/ |
strsrch.cpp | 64 UCollator * collator = 0; variable 151 * Creates a collator 155 // Set up an ICU collator 160 collator = ucol_openRules(rules, -1, UCOL_OFF, UCOL_TERTIARY, 164 collator = ucol_open(opt_locale, &status); 167 fprintf(stderr, "Collator creation failed.: %d\n", status); 179 ucol_setAttribute(collator, UCOL_NORMALIZATION_MODE, UCOL_ON, &status); 182 ucol_setAttribute(collator, UCOL_FRENCH_COLLATION, UCOL_ON, &status); 185 ucol_setAttribute(collator, UCOL_CASE_FIRST, UCOL_LOWER_FIRST, 189 ucol_setAttribute(collator, UCOL_CASE_FIRST, UCOL_UPPER_FIRST, [all...] |
/external/icu/android_icu4j/src/main/java/android/icu/impl/text/ |
RbnfScannerProviderImpl.java | 18 import android.icu.text.Collator; 26 * implementation behind setLenientParseMode, which is based on Collator. 62 * The Collator used is determined by the locale that was 65 * end of the default collator for the locale, enabling additional equivalences 99 RuleBasedCollator collator = null; local 101 // create a default collator based on the locale, 102 // then pull out that collator's rules, append any additional 104 // collator based on the combination of those rules 105 collator = (RuleBasedCollator)Collator.getInstance(locale.toLocale()) 127 private final RuleBasedCollator collator; field in class:RbnfScannerProviderImpl.RbnfLenientScannerImpl [all...] |
/external/icu/icu4j/main/classes/collate/src/com/ibm/icu/impl/text/ |
RbnfScannerProviderImpl.java | 17 import com.ibm.icu.text.Collator; 25 * implementation behind setLenientParseMode, which is based on Collator. 60 * The Collator used is determined by the locale that was 63 * end of the default collator for the locale, enabling additional equivalences 97 RuleBasedCollator collator = null; local 99 // create a default collator based on the locale, 100 // then pull out that collator's rules, append any additional 102 // collator based on the combination of those rules 103 collator = (RuleBasedCollator)Collator.getInstance(locale.toLocale()) 125 private final RuleBasedCollator collator; field in class:RbnfScannerProviderImpl.RbnfLenientScannerImpl [all...] |
/frameworks/base/packages/SettingsLib/src/com/android/settingslib/applications/ |
PermissionsSummaryHelper.java | 23 import java.text.Collator; 58 Collator collator = Collator.getInstance(); 59 collator.setStrength(Collator.PRIMARY); 60 Collections.sort(grantedStandardLabels, collator);
|
/external/sqlite/android/ |
sqlite3_android.cpp | 231 UCollator* collator; member in struct:SqliteUserData 285 UCollator* collator = (UCollator*)sqlite3_user_data(context); local 368 uint32_t result = ucol_getSortKey(collator, token, -1, (uint8_t*)keybuf, sizeof(keybuf)-1); 411 static void localized_collator_dtor(UCollator* collator) 413 ucol_close(collator); 418 // This collator may be removed in the near future, so you MUST not use now. 431 UCollator* collator = ucol_open(systemLocale, &status); local 436 ucol_setAttribute(collator, UCOL_STRENGTH, UCOL_PRIMARY, &status); 443 err = sqlite3_create_collation_v2(handle, LOCALIZED_COLLATOR_NAME, SQLITE_UTF16, collator, 446 err = sqlite3_create_collation_v2(handle, LOCALIZED_COLLATOR_NAME, SQLITE_UTF8, collator, 505 UCollator * collator = ucol_open(NULL, &status); local [all...] |
/external/v8/src/ |
i18n.cc | 465 icu::Collator* CreateICUCollator( 469 // Make collator from options. 470 icu::Collator* collator = NULL; local 472 collator = icu::Collator::createInstance(icu_locale, status); 475 delete collator; 482 collator->setAttribute( 489 collator->setAttribute(UCOL_NORMALIZATION_MODE, UCOL_ON, status); 494 collator->setAttribute(UCOL_CASE_FIRST, UCOL_UPPER_FIRST, status) 828 icu::Collator* collator = CreateICUCollator(isolate, icu_locale, options); local [all...] |
/external/icu/android_icu4j/src/main/java/android/icu/text/ |
CollationElementIterator.java | 90 * the comparison level of the collator. The method previous() returns the 92 * the collator. The Collation Element Iterator moves only in one direction 103 * @see Collator 192 private CollationElementIterator(RuleBasedCollator collator) { 194 rbc_ = collator; 204 * collator. If the source string is empty, NULLORDER will be 208 * @param collator the RuleBasedCollator 210 CollationElementIterator(String source, RuleBasedCollator collator) { 211 this(collator); 214 // Note: The constructors should take settings & tailoring, not a collator, [all...] |
LocaleDisplayNames.java | 256 * @param collator how to collate?should normally be Collator.getInstance(getDisplayLocale()) 264 public List<UiListItem> getUiList(Set<ULocale> localeSet, boolean inSelf, Comparator<Object> collator) { 265 return getUiListCompareWholeItems(localeSet, UiListItem.getComparator(collator, inSelf)); 351 * @param comparator (meant for strings, but because Java Collator doesn't have <String>...) 359 private final Comparator<Object> collator; field in class:LocaleDisplayNames.UiListItem.UiListItemComparator 361 UiListItemComparator(Comparator<Object> collator, boolean useSelf) { 362 this.collator = collator; 367 int result = useSelf ? collator.compare(o1.nameInSelf, o2.nameInSelf [all...] |
/external/icu/icu4j/main/classes/collate/src/com/ibm/icu/text/ |
CollationElementIterator.java | 89 * the comparison level of the collator. The method previous() returns the 91 * the collator. The Collation Element Iterator moves only in one direction 102 * @see Collator 197 private CollationElementIterator(RuleBasedCollator collator) { 199 rbc_ = collator; 209 * collator. If the source string is empty, NULLORDER will be 213 * @param collator the RuleBasedCollator 216 CollationElementIterator(String source, RuleBasedCollator collator) { 217 this(collator); 220 // Note: The constructors should take settings & tailoring, not a collator, [all...] |
/external/icu/icu4j/main/classes/core/src/com/ibm/icu/text/ |
LocaleDisplayNames.java | 276 * @param collator how to collate?should normally be Collator.getInstance(getDisplayLocale()) 285 public List<UiListItem> getUiList(Set<ULocale> localeSet, boolean inSelf, Comparator<Object> collator) { 286 return getUiListCompareWholeItems(localeSet, UiListItem.getComparator(collator, inSelf)); 385 * @param comparator (meant for strings, but because Java Collator doesn't have <String>...) 394 private final Comparator<Object> collator; field in class:LocaleDisplayNames.UiListItem.UiListItemComparator 396 UiListItemComparator(Comparator<Object> collator, boolean useSelf) { 397 this.collator = collator; 402 int result = useSelf ? collator.compare(o1.nameInSelf, o2.nameInSelf [all...] |
/frameworks/base/packages/SettingsLib/src/com/android/settingslib/inputmethod/ |
InputMethodSubtypePreference.java | 28 import java.text.Collator; 61 public int compareTo(final Preference rhs, final Collator collator) { 85 return collator.compare(t0.toString(), t1.toString());
|