public static final class Collation.Unicode extends Collation
Collation.ASCII, Collation.Unicode
Modifier and Type | Method and Description |
---|---|
Collation.Unicode |
ignoreAccents(boolean ignoreAccents)
Specifies whether the collation ignore the accents or diacritics when
comparing the strings or not.
|
Collation.Unicode |
ignoreCase(boolean ignoreCase)
Specifies whether the collation is case-insensitive or not.
|
Collation.Unicode |
locale(String locale)
Specifies the locale to allow the collation to compare strings appropriately base on
the locale.
|
@NonNull public Collation.Unicode ignoreCase(boolean ignoreCase)
ignoreCase
- True for case-insensitive; false for case-sensitive.@NonNull public Collation.Unicode ignoreAccents(boolean ignoreAccents)
ignoreAccents
- True for accent-insensitive; false for accent-sensitive.@NonNull public Collation.Unicode locale(String locale)
locale
- The locale code which is an [ISO-639](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes)
language code plus, optionally, an underscore and an
[ISO-3166](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)
country code: "en", "en_US", "fr_CA", etc.
Specifying the locale will allow the collation to compare strings
appropriately base on the locale.