@API(value=EXPERIMENTAL) public interface TextCollator extends Comparator<String>
TextCollatorRegistry
Modifier and Type | Interface and Description |
---|---|
static class |
TextCollator.Strength
Standard strength values.
|
Modifier and Type | Method and Description |
---|---|
int |
compare(String str1,
String str2)
Compare the two strings according to the this collator's collation rules.
|
ByteString |
getKey(String str)
Get a representation of a string suitable for storing in an index for this collation.
|
comparing, comparing, comparingDouble, comparingInt, comparingLong, equals, naturalOrder, nullsFirst, nullsLast, reversed, reverseOrder, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
int compare(@Nonnull String str1, @Nonnull String str2)
compare
in interface Comparator<String>
str1
- the first stringstr2
- the second string@Nonnull ByteString getKey(@Nonnull String str)
str
- the string to index