Class TextCollatorRegistryJRE.TextCollatorJRE

    • Constructor Detail

    • Method Detail

      • compare

        public int compare​(@Nonnull
                           String str1,
                           @Nonnull
                           String str2)
        Description copied from interface: TextCollator
        Compare the two strings according to the this collator's collation rules.
        Specified by:
        compare in interface Comparator<String>
        Specified by:
        compare in interface TextCollator
        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
        public ByteString getKey​(@Nonnull
                                 String str)
        Description copied from interface: TextCollator
        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.
        Specified by:
        getKey in interface TextCollator
        Parameters:
        str - the string to index
        Returns:
        a byte string for storing in an index