gnu.xquery.util

Class NamedCollator

Implemented Interfaces:
Externalizable

public class NamedCollator
extends java.text.Collator
implements Externalizable

Field Summary

static String
UNICODE_CODEPOINT_COLLATION
static NamedCollator
codepointCollation

Method Summary

static int
codepointCompare(String str1, String str2)
Compares two strings lexicographically by codepoint.
int
compare(String str1, String str2)
static NamedCollator
find(String name)
java.text.CollationKey
getCollationKey(String source)
String
getName()
int
hashCode()
static NamedCollator
make(String name)
void
readExternal(ObjectInput in)
void
resolve()
void
writeExternal(ObjectOutput out)

Field Details

UNICODE_CODEPOINT_COLLATION

public static final String UNICODE_CODEPOINT_COLLATION

codepointCollation

public static final NamedCollator codepointCollation

Method Details

codepointCompare

public static int codepointCompare(String str1,
                                   String str2)
Compares two strings lexicographically by codepoint. Same as String.compareTo but handles surrogate characters.
Returns:
-1, 0, or 1 depending on their relative order.

compare

public int compare(String str1,
                   String str2)

find

public static NamedCollator find(String name)

getCollationKey

public java.text.CollationKey getCollationKey(String source)

getName

public String getName()

hashCode

public int hashCode()

make

public static NamedCollator make(String name)

readExternal

public void readExternal(ObjectInput in)
            throws IOException,
                   ClassNotFoundException

resolve

public void resolve()

writeExternal

public void writeExternal(ObjectOutput out)
            throws IOException