Class CollationResolver
java.lang.Object
org.rumbledb.runtime.functions.strings.CollationResolver
Resolves a collation URI to a
Comparator usable for string comparison, backed by ICU4J
for the UCA-parametrized collation family.-
Method Summary
Modifier and TypeMethodDescriptionstatic byte[]collationKeyBytes(String value, String collationUri, ExceptionMetadata metadata) Returns a byte encoding such that unsigned lexicographic order of the bytes matches the collation order (used by fn:collation-key).static booleanequals(String a, String b, String collationUri, ExceptionMetadata metadata) static Comparator<String>resolve(String collationUri, ExceptionMetadata metadata)
-
Method Details
-
resolve
-
equals
-
collationKeyBytes
public static byte[] collationKeyBytes(String value, String collationUri, ExceptionMetadata metadata) Returns a byte encoding such that unsigned lexicographic order of the bytes matches the collation order (used by fn:collation-key). For the codepoint collation, this is simply the UTF-8 encoding, per its definition in terms of Unicode code points.
-