com.saxonica.expr
Class EquivalenceComparer

java.lang.Object
  extended by net.sf.saxon.expr.sort.AtomicSortComparer
      extended by com.saxonica.expr.EquivalenceComparer
All Implemented Interfaces:
Serializable, AtomicComparer

public class EquivalenceComparer
extends AtomicSortComparer

A comparer that compares atomic values for equality, with the properties: - non-comparable types compare false - NaN compares equal to NaN

See Also:
Serialized Form

Field Summary
 
Fields inherited from class net.sf.saxon.expr.sort.AtomicSortComparer
COLLATION_KEY_NaN
 
Constructor Summary
protected EquivalenceComparer(StringCollator collator, int itemType, XPathContext context)
           
 
Method Summary
protected  int compareNonComparables(AtomicValue a, AtomicValue b)
          Compare two values that are known to be non-comparable.
 
Methods inherited from class net.sf.saxon.expr.sort.AtomicSortComparer
compareAtomicValues, comparesEqual, getCollator, getComparisonKey, getItemType, getStringCollator, makeSortComparer, provideContext
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EquivalenceComparer

protected EquivalenceComparer(StringCollator collator,
                              int itemType,
                              XPathContext context)
Method Detail

compareNonComparables

protected int compareNonComparables(AtomicValue a,
                                    AtomicValue b)
Compare two values that are known to be non-comparable. In the base class this method throws a ClassCastException. In this subclass it is overridden to return Value.INDETERMINATE_ORDERING

Overrides:
compareNonComparables in class AtomicSortComparer


Copyright (c) 2004-2010 Saxonica Limited. All rights reserved.