net.sf.saxon.sort
public class NumericComparer extends java.lang.Object implements AtomicComparer, java.io.Serializable
Modifier and Type | Method and Description |
---|---|
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
|
public static NumericComparer getInstance()
public AtomicComparer provideContext(XPathContext context)
provideContext
in interface AtomicComparer
context
- the dynamic evaluation contextpublic int compareAtomicValues(AtomicValue a, AtomicValue b)
compareAtomicValues
in interface AtomicComparer
a
- the first Item to be compared.b
- the second Item to be compared.java.lang.ClassCastException
- if the objects are not Itemspublic boolean comparesEqual(AtomicValue a, AtomicValue b)
comparesEqual
in interface AtomicComparer
a
- the first object to be compared.b
- the second object to be compared.java.lang.ClassCastException
- if the objects are not comparablepublic ComparisonKey getComparisonKey(AtomicValue a)
getComparisonKey
in interface AtomicComparer