Package in.cdac.medinfo.csnotk.csnolib.util

## Class KeyBasedComparator

- java.lang.Object
- - in.cdac.medinfo.csnotk.csnolib.util.KeyBasedComparator

- All Implemented Interfaces:
    `java.util.Comparator<Description>`

      public class KeyBasedComparator
      extends java.lang.Object
      implements java.util.Comparator<Description>

  The class compares two `Description` objects on the basis of textual representation.

- - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `KeyBasedComparator​(java.lang.String term)` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `int` | `compare​(Description o1, Description o2)` | Compares two Description objects on the basis of textual representation.

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

      `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

    - ### Methods inherited from interface java.util.Comparator

      `equals, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong`

- - ### Constructor Detail

    - #### KeyBasedComparator

          public KeyBasedComparator​(java.lang.String term)

  - ### Method Detail

    - #### compare

          public int compare​(Description o1,
                             Description o2)

      Compares two Description objects on the basis of textual representation.
      Specified by:
        `compare` in interface `java.util.Comparator<Description>`
      Parameters:
        `o1` - Object of `Description`.
        `o2` - Object of `Description`.