Package com.couchbase.lite
Class Collation.Unicode
java.lang.Object
com.couchbase.lite.Collation
com.couchbase.lite.Collation.Unicode
- Enclosing class:
- Collation
Unicode Collation that will compare two strings
by using Unicode collation algorithm. If the locale is not specified, the collation is
Unicode-aware but not localized; for example, accented Roman letters sort right after
the base letter
-
Nested Class Summary
Nested classes/interfaces inherited from class com.couchbase.lite.Collation
Collation.ASCII, Collation.Unicode
-
Method Summary
Modifier and TypeMethodDescriptionsetIgnoreAccents
(boolean ignAccents) Specifies whether the collation ignore the accents or diacritics when comparing the strings or not.setIgnoreCase
(boolean ignCase) Specifies whether the collation is case-insensitive or not.Specifies the locale to allow the collation to compare strings appropriately based on the locale.
-
Method Details
-
setLocale
Specifies the locale to allow the collation to compare strings appropriately based on the locale. The local code 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. -
setIgnoreAccents
Specifies whether the collation ignore the accents or diacritics when comparing the strings or not.- Overrides:
setIgnoreAccents
in classCollation
- Parameters:
ignAccents
- True for accent-insensitive; false for accent-sensitive.- Returns:
- The Unicode Collation object.
-
setIgnoreCase
Specifies whether the collation is case-insensitive or not. Case-insensitive collation will treat ASCII uppercase and lowercase letters as equivalent.- Overrides:
setIgnoreCase
in classCollation
- Parameters:
ignCase
- True for case-insensitive; false for case-sensitive.- Returns:
- The Unicode Collation object.
-