Java Code Examples for java.text.Collator#TERTIARY
The following examples show how to use
java.text.Collator#TERTIARY .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: Utils.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
private int compareStrings(boolean caseSensitive, String s1, String s2) { if (caseSensitive) { if (tertiaryCollator == null) { tertiaryCollator = new DocCollator(configuration.locale, Collator.TERTIARY); } return tertiaryCollator.compare(s1, s2); } if (secondaryCollator == null) { secondaryCollator = new DocCollator(configuration.locale, Collator.SECONDARY); } return secondaryCollator.compare(s1, s2); }
Example 2
Source File: JavaCollation.java From calcite with Apache License 2.0 | 5 votes |
private static String getStrengthString(int strengthValue) { switch (strengthValue) { case Collator.PRIMARY: return STRENGTH_PRIMARY; case Collator.SECONDARY: return STRENGTH_SECONDARY; case Collator.TERTIARY: return STRENGTH_TERTIARY; case Collator.IDENTICAL: return STRENGTH_IDENTICAL; default: throw new IllegalArgumentException("Incorrect strength value."); } }
Example 3
Source File: BasicEvaluator.java From jclic with GNU General Public License v2.0 | 4 votes |
@Override protected void init() { super.init(); strength = checkAccents ? checkCase ? Collator.TERTIARY : Collator.SECONDARY : Collator.PRIMARY; collator.setStrength(strength); }