Package com.saxonica.expr.sort
Class UcaCollationKeyUsingIcu
- java.lang.Object
-
- java.text.CollationKey
-
- com.saxonica.expr.sort.UcaCollationKeyUsingIcu
-
- All Implemented Interfaces:
java.lang.Comparable<java.text.CollationKey>
public class UcaCollationKeyUsingIcu extends java.text.CollationKeyThis class is an implementation of Saxon collation keys based on the functionality of collation keys supplied by the ICU library. Collation keys are used not only to support thefn:collation-keyfunction in XPath, but also internally to supportfn:distinct-values,xsl:for-each-group, and XQuery grouping.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompareTo(java.text.CollationKey target)Compare this collation key to another.booleanequals(java.lang.Object obj)Test if two collation keys are equalcom.ibm.icu.text.CollationKeygetKey()Get the internal ICU collation keyinthashCode()Get a hash code supporting the equals() methodbyte[]toByteArray()Get a binary representation of this collection key
-
-
-
Method Detail
-
getKey
public com.ibm.icu.text.CollationKey getKey()
Get the internal ICU collation key- Returns:
- the internal ICU collation key
-
compareTo
public int compareTo(java.text.CollationKey target)
Compare this collation key to another.- Specified by:
compareToin interfacejava.lang.Comparable<java.text.CollationKey>- Specified by:
compareToin classjava.text.CollationKey- Parameters:
target- the other collation key- Returns:
- true if the collation keys are equal, implying that the corresponding strings are to be considered equal
- Throws:
java.lang.ClassCastException- if the other collation key is not an ICU-based collation key.
-
toByteArray
public byte[] toByteArray()
Get a binary representation of this collection key- Specified by:
toByteArrayin classjava.text.CollationKey- Returns:
- a binary representation of the key, such that binary comparison can be used to compare keys.
-
hashCode
public int hashCode()
Get a hash code supporting the equals() method- Overrides:
hashCodein classjava.lang.Object- Returns:
- a hash code for the collation key
-
equals
public boolean equals(java.lang.Object obj)
Test if two collation keys are equal- Overrides:
equalsin classjava.lang.Object- Parameters:
obj- the other collation key- Returns:
- true if the argument is an ICU-based collation key representing a string that is considered equal to the string represented by this collation key.
-
-