net.sf.saxon.sort
public class NumericComparer extends Object implements AtomicComparer, Serializable
Method Summary | |
---|---|
int | compareAtomicValues(AtomicValue a, AtomicValue b)
Compare two Items by converting them to numbers and comparing the numeric values. |
boolean | comparesEqual(AtomicValue a, AtomicValue b)
Compare two AtomicValue objects for equality according to the rules for their data type. |
ComparisonKey | getComparisonKey(AtomicValue a)
Get a comparison key for an object. |
static NumericComparer | getInstance() |
AtomicComparer | provideContext(XPathContext context)
Supply the dynamic context in case this is needed for the comparison |
Parameters: a the first Item to be compared. b the second Item to be compared.
Returns: <0 if a0 if a>b
Throws: ClassCastException if the objects are not Items
Parameters: a the first object to be compared. b the second object to be compared.
Returns: true if the values are equal, false if not
Throws: ClassCastException if the objects are not comparable
Parameters: context the dynamic evaluation context
Returns: either the original AtomicComparer, or a new AtomicComparer in which the context is known. The original AtomicComparer is not modified