IDataTypeComparer for booleans. Booleans have two states, so they have two comparable results, Equal and NotEqual. This class expects both values to be booleans. Without any lookup key specified, it only checks the value types. Otherwise, the LookupKeys must be LookupKey.Boolean.

Implements

Constructors

Methods

Constructors

Methods

  • Determines if this Comparer supports the inputs. Do not call compare() if this returns false.

    Parameters

    • value1: any

      The first value to compare.

    • value2: any

      The second value to compare.

    • lookupKey1: null | string

      A lookup key indicating how to interpret value1 or null if no such hint is needed.

    • lookupKey2: null | string

      A lookup key indicating how to interpret value2 or null if no such hint is needed.

    Returns boolean

  • Performs the comparison. It has 3 possible outcomes:

    • Using Equal, LessThan and GreaterThan when both values can be compared relative to the other.
    • Using Equal and NotEqual when the values don't make sense as LessThan or GreaterThan, such as with booleans.
    • Using Undetermined when either of the values are not supported.

    Parameters

    • value1: any
    • value2: any
    • lookupKey1: null | string
    • lookupKey2: null | string

    Returns ComparersResult

Generated using TypeDoc v0.25.12