## net.sf.saxon.sort
Class AtomicSortComparer.ComparisonKey

    java.lang.Object
      |
      +--net.sf.saxon.sort.AtomicSortComparer.ComparisonKey

Enclosing class:
  AtomicSortComparer

public static class AtomicSortComparer.ComparisonKey
extends java.lang.Object

Inner class: an object used as a comparison key. Two XPath atomic values are equal if and only if their comparison keys are equal.

Constructor Summary
`AtomicSortComparer.ComparisonKey(int category, AtomicValue value)` Create a comparison key for a value in a particular category.
`AtomicSortComparer.ComparisonKey(int category, java.text.CollationKey value)` Create a comparison key for strings using a particular collation.

Method Summary
`boolean` `equals(java.lang.Object other)` Test if two comparison keys are equal
`int` `hashCode()` Get a hashcode for a comparison key.

Methods inherited from class java.lang.Object
`clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### AtomicSortComparer.ComparisonKey

    public AtomicSortComparer.ComparisonKey(int category,
                                            AtomicValue value)

  Create a comparison key for a value in a particular category. The "category" here represents a set of primitive types that allow mutual comparison (so all numeric values are in the same category).

Parameters:
  `category` - the category
  `value` - the value within the category

### AtomicSortComparer.ComparisonKey

    public AtomicSortComparer.ComparisonKey(int category,
                                            java.text.CollationKey value)

  Create a comparison key for strings using a particular collation. In this case the value compared is the collation key provided by the collator

Parameters:
  `category` - Always Type.STRING
  `value` - The collation key

Method Detail

### equals

    public boolean equals(java.lang.Object other)

  Test if two comparison keys are equal

  Overrides:
    `equals` in class `java.lang.Object`
  Parameters:
    `other` - the other comparison key
  Returns:
    true if they are equal
  Throws:
    `java.lang.ClassCastException` - if the other object is not a ComparisonKey

### hashCode

    public int hashCode()

  Get a hashcode for a comparison key. If two comparison keys are equal, they must have the same hash code.

  Overrides:
    `hashCode` in class `java.lang.Object`
  Returns:
    the hash code.