com.saxonica.expr

## Class EquivalenceComparer

- java.lang.Object
- - net.sf.saxon.expr.sort.AtomicSortComparer
  - - 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

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `EquivalenceComparer(StringCollator collator, int itemType, XPathContext context)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `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 `SequenceTool.INDETERMINATE_ORDERING`
      Overrides:
        `compareNonComparables` in class `AtomicSortComparer`

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