Package net.sf.saxon.expr.sort

## Class CollationMatchKey

- java.lang.Object
- - net.sf.saxon.expr.sort.CollationMatchKey

- All Implemented Interfaces:
    `java.lang.Comparable`, `AtomicMatchKey`

      public class CollationMatchKey
      extends java.lang.Object
      implements AtomicMatchKey, java.lang.Comparable

  A match key for comparing strings under a collation. Wraps a Java CollationKey obtained from the collation.

- - ### Field Summary

    - ### Fields inherited from interface net.sf.saxon.expr.sort.AtomicMatchKey

      `NaN_MATCH_KEY`

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `CollationMatchKey​(java.text.CollationKey key)` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `AtomicValue` | `asAtomic()` | Get an atomic value that encapsulates this match key.
    `int` | `compareTo​(java.lang.Object o)` |
    `boolean` | `equals​(java.lang.Object o)` |
    `int` | `hashCode()` |

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### CollationMatchKey

          public CollationMatchKey​(java.text.CollationKey key)

  - ### Method Detail

    - #### compareTo

          public int compareTo​(java.lang.Object o)

      Specified by:
        `compareTo` in interface `java.lang.Comparable`

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `java.lang.Object`

    - #### equals

          public boolean equals​(java.lang.Object o)

      Overrides:
        `equals` in class `java.lang.Object`

    - #### asAtomic

          public AtomicValue asAtomic()

      Get an atomic value that encapsulates this match key. Needed to support the collation-key() function.
      Specified by:
        `asAtomic` in interface `AtomicMatchKey`
      Returns:
        an atomic value that encapsulates this match key