public class UCACollator extends Collator
Note that in the case that the ICU libraries have not been loaded, then this class is not instantiated. However, the public static functions, e.g. getLocales() could in theory be accessed via an XSLT stylesheet (such as the documentation generators for example) and these invoke ICU features The guard function com.saxonica.config.JavaPlatformPE.hasICUCollator() can be used to check.
CANONICAL_DECOMPOSITION, FULL_DECOMPOSITION, IDENTICAL, NO_DECOMPOSITION, PRIMARY, SECONDARY, TERTIARY
Constructor and Description |
---|
UCACollator() |
UCACollator(String uri) |
Modifier and Type | Method and Description |
---|---|
int |
compare(String source,
String target) |
CollationKey |
getCollationKey(String source) |
com.ibm.icu.util.ULocale |
getLocale() |
static String[] |
getLocales()
Return the locales supported in this version of ICU
Note that with Java 6 this method has been known to throw an array index exception from RuleBasedCollator,
With Java 7 this performs correctly and getAvailableLocales() does not appear to be
invoked from any of the UCA or numbering support.
|
static String |
getUCAVersion()
Return the version of UCA supported
|
int |
hashCode() |
void |
setProps(Properties props)
Set the properties for the UCA collation
|
void |
setStrength(int newStrength) |
String |
show() |
clone, compare, equals, equals, getAvailableLocales, getDecomposition, getInstance, getInstance, getStrength, setDecomposition
public UCACollator()
public UCACollator(String uri) throws XPathException
XPathException
public static String getUCAVersion()
public static String[] getLocales()
public String show()
public CollationKey getCollationKey(String source)
getCollationKey
in class Collator
public void setProps(Properties props) throws XPathException
props
- the set of properties parsed from the UCA parametersXPathException
public void setStrength(int newStrength)
setStrength
in class Collator
public com.ibm.icu.util.ULocale getLocale()
Copyright (c) 2004-2014 Saxonica Limited. All rights reserved.