|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.basex.query.util.Collation
public final class Collation
This class organizes collations. Some of the core functions have been inspired by the Saxon HE source code.
Method Summary | |
---|---|
byte[] |
after(byte[] string,
byte[] sub,
InputInfo info)
Returns the substring after a specified string. |
byte[] |
before(byte[] string,
byte[] sub,
InputInfo info)
Returns the substring before a specified string. |
int |
compare(byte[] string,
byte[] compare)
Compares two strings. |
boolean |
contains(byte[] string,
byte[] sub,
InputInfo info)
Checks if a string is contained in another. |
boolean |
endsWith(byte[] string,
byte[] sub,
InputInfo info)
Checks if a string ends with another. |
static Collation |
get(byte[] uri,
QueryContext ctx,
InputInfo info,
Err err)
Returns a collation instance for the specified uri. |
boolean |
startsWith(byte[] string,
byte[] sub,
InputInfo info)
Checks if a string starts with another. |
byte[] |
uri()
Returns the collation URI. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static Collation get(byte[] uri, QueryContext ctx, InputInfo info, Err err) throws QueryException
uri
- collation urictx
- query contextinfo
- input infoerr
- error code for unknown collation uris
null
for unicode point collation
QueryException
- query exceptionpublic int compare(byte[] string, byte[] compare)
string
- stringcompare
- string to be compared
public boolean contains(byte[] string, byte[] sub, InputInfo info) throws QueryException
string
- stringsub
- substring to be foundinfo
- input info
QueryException
- query exceptionpublic boolean startsWith(byte[] string, byte[] sub, InputInfo info) throws QueryException
string
- stringsub
- substring to be foundinfo
- input info
QueryException
- query exceptionpublic boolean endsWith(byte[] string, byte[] sub, InputInfo info) throws QueryException
string
- stringsub
- substring to be foundinfo
- input info
QueryException
- query exceptionpublic byte[] after(byte[] string, byte[] sub, InputInfo info) throws QueryException
string
- stringsub
- substring to be foundinfo
- input info
QueryException
- query exceptionpublic byte[] before(byte[] string, byte[] sub, InputInfo info) throws QueryException
string
- stringsub
- substring to be foundinfo
- input info
QueryException
- query exceptionpublic byte[] uri()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |