public class CodepointCollator extends java.lang.Object implements StringCollator, SubstringMatcher
| Constructor and Description |
|---|
CodepointCollator() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
comparesEqual(UnicodeString s1,
UnicodeString s2)
Test whether one string is equal to another, according to the rules
of the XPath compare() function.
|
int |
compareStrings(UnicodeString a,
UnicodeString b)
Compare two string objects.
|
boolean |
contains(UnicodeString s1,
UnicodeString s2)
Test whether one string contains another, according to the rules
of the XPath contains() function
|
boolean |
endsWith(UnicodeString s1,
UnicodeString s2)
Test whether one string ends with another, according to the rules
of the XPath ends-with() function
|
AtomicMatchKey |
getCollationKey(UnicodeString s)
Get a collation key for a string.
|
java.lang.String |
getCollationURI()
Get the collation URI.
|
static CodepointCollator |
getInstance() |
boolean |
startsWith(UnicodeString s1,
UnicodeString s2)
Test whether one string starts with another, according to the rules
of the XPath starts-with() function
|
UnicodeString |
substringAfter(UnicodeString s1,
UnicodeString s2)
Return the part of a string after a given substring, according to the rules
of the XPath substring-after() function
|
UnicodeString |
substringBefore(UnicodeString s1,
UnicodeString s2)
Return the part of a string before a given substring, according to the rules
of the XPath substring-before() function
|
public static CodepointCollator getInstance()
public java.lang.String getCollationURI()
getCollationURI in interface StringCollatorpublic int compareStrings(UnicodeString a, UnicodeString b)
compareStrings in interface StringCollatora - the first stringb - the second stringjava.lang.ClassCastException - if the objects are of the wrong type for this Comparerpublic boolean comparesEqual(UnicodeString s1, UnicodeString s2)
comparesEqual in interface StringCollators1 - the first strings2 - the second stringpublic boolean contains(UnicodeString s1, UnicodeString s2)
contains in interface SubstringMatchers1 - the containing strings2 - the contained stringpublic boolean endsWith(UnicodeString s1, UnicodeString s2)
endsWith in interface SubstringMatchers1 - the containing strings2 - the contained stringpublic boolean startsWith(UnicodeString s1, UnicodeString s2)
startsWith in interface SubstringMatchers1 - the containing strings2 - the contained stringpublic UnicodeString substringAfter(UnicodeString s1, UnicodeString s2)
substringAfter in interface SubstringMatchers1 - the containing strings2 - the contained stringpublic UnicodeString substringBefore(UnicodeString s1, UnicodeString s2)
substringBefore in interface SubstringMatchers1 - the containing strings2 - the contained stringpublic AtomicMatchKey getCollationKey(UnicodeString s)
getCollationKey in interface StringCollators - the string whose collation key is requiredCopyright (c) 2004-2022 Saxonica Limited. All rights reserved.