| java.lang.Object net.sf.saxon.sort.NumericComparer
NumericComparer | public class NumericComparer implements Comparator,java.io.Serializable(Code) | | A Comparer used for comparing sort keys when data-type="number". The items to be
compared are converted to numbers, and the numbers are then compared directly
author: Michael H. Kay |
Method Summary | |
public int | compare(Object a, Object b) Compare two Items by converting them to numbers and comparing the numeric values. |
NumericComparer | public NumericComparer()(Code) | | |
compare | public int compare(Object a, Object b)(Code) | | Compare two Items by converting them to numbers and comparing the numeric values. If either
value cannot be converted to a number, it is treated as NaN, and compares less that the other
(two NaN values compare equal).
Parameters: a - the first Item to be compared. Parameters: b - the second Item to be compared. <0 if a0 if a>b throws: ClassCastException - if the objects are not Items |
|
|