|
: Class Comparer
com.icl.saxon.sort
Class Comparer
java.lang.Object
|
+--com.icl.saxon.sort.Comparer
- Direct Known Subclasses:
- DescendingComparer, DoubleComparer, LowercaseFirstComparer, TextComparer, UppercaseFirstComparer
- public abstract class Comparer
- extends java.lang.Object
A Comparer used for comparing keys
Method Summary |
abstract int |
compare(java.lang.Object a,
java.lang.Object b)
Compare two objects. |
Comparer |
setDataType(java.lang.String dataTypeURI,
java.lang.String dataTypeLocalName)
Set data type. |
Comparer |
setOrder(boolean isAscending)
Set order. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Comparer
public Comparer()
compare
public abstract int compare(java.lang.Object a,
java.lang.Object b)
- Compare two objects.
- Returns:
- <0 if a0 if a>b
- Throws:
java.lang.ClassCastException - if the objects are of the wrong type for this Comparer
setDataType
public Comparer setDataType(java.lang.String dataTypeURI,
java.lang.String dataTypeLocalName)
- Set data type. The comparer has the option of returning a different comparer
once it knows the data type
setOrder
public Comparer setOrder(boolean isAscending)
- Set order. The comparer has the option of returning a different comparer
|