Interface TextCollator

    • Method Detail

      • compare

        int compare​(@Nonnull
                    String str1,
                    @Nonnull
                    String str2)
        Compare the two strings according to the this collator's collation rules.
        Specified by:
        compare in interface Comparator<String>
        Parameters:
        str1 - the first string
        str2 - the second string
        Returns:
        an integer equal to zero if the two strings are equivalent, less than zero if the first string should sort before the second, or greater than zero if the first string should sort after the second.
      • getKey

        @Nonnull
        ByteString getKey​(@Nonnull
                          String str)
        Get a representation of a string suitable for storing in an index for this collation. The unsigned byte comparison of the result byte array will match this collator's ordering.
        Parameters:
        str - the string to index
        Returns:
        a byte string for storing in an index