Class Collation.Unicode

java.lang.Object
com.couchbase.lite.Collation
com.couchbase.lite.Collation.Unicode
Enclosing class:
Collation

public static final class Collation.Unicode extends 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
  • Method Details

    • setLocale

      @NonNull public Collation.Unicode setLocale(@Nullable String locale)
      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.
      Parameters:
      locale - The locale code
      Returns:
      this
    • setIgnoreAccents

      @NonNull public Collation.Unicode setIgnoreAccents(boolean ignAccents)
      Specifies whether the collation ignore the accents or diacritics when comparing the strings or not.
      Parameters:
      ignAccents - True for accent-insensitive; false for accent-sensitive.
      Returns:
      The Unicode Collation object.
    • setIgnoreCase

      @NonNull public Collation.Unicode setIgnoreCase(boolean ignCase)
      Specifies whether the collation is case-insensitive or not. Case-insensitive collation will treat ASCII uppercase and lowercase letters as equivalent.
      Parameters:
      ignCase - True for case-insensitive; false for case-sensitive.
      Returns:
      The Unicode Collation object.