net.sf.saxon.sort
Class LowercaseFirstComparer
java.lang.Object
net.sf.saxon.sort.LowercaseFirstComparer
- All Implemented Interfaces:
- Serializable, StringCollator
public class LowercaseFirstComparer
- extends Object
- implements StringCollator, Serializable
A Comparer used for comparing keys
- Author:
- Michael H. Kay
- See Also:
- Serialized Form
LowercaseFirstComparer
public LowercaseFirstComparer(StringCollator base)
compareStrings
public int compareStrings(String a,
String b)
- Compare two string objects: case is irrelevant, unless the strings are equal ignoring
case, in which case lowercase comes first.
- Specified by:
compareStrings
in interface StringCollator
- Parameters:
a
- the first stringb
- the second string
- Returns:
- <0 if a0 if a>b
- Throws:
ClassCastException
- if the objects are of the wrong type for this Comparer
getCollationKey
public Object getCollationKey(String s,
Platform platform)
- Get a collation key for two Strings. The essential property of collation keys
is that if two values are equal under the collation, then the collation keys are
compare correctly under the equals() method.
- Specified by:
getCollationKey
in interface StringCollator
Copyright (C) Michael H. Kay. All rights reserved.