A class for helping in complex sorting patterns.

Type Parameters

  • T

Hierarchy

Implements

  • Comparer<T>

Constructors

Properties

Accessors

Methods

Constructors

  • Constructs a SortContext.

    Type Parameters

    • T

    Parameters

    • _next: null | Comparer<T>

      If provided (not null) any items that are considered equal will use this comparer to decided their order.

    • _comparer: Comparison<T>

      The comparison function that will differentiate between items.

    • _order: Order = Order.Ascending

      Ascending or Descending.

    Returns SortContext<T>

Properties

_comparer: Comparison<T>

The comparison function that will differentiate between items.

_next: null | Comparer<T>

If provided (not null) any items that are considered equal will use this comparer to decided their order.

_order: Order = Order.Ascending

Ascending or Descending.

Accessors

Methods

  • Compares two values based upon SortContext parameters.

    Returns

    Parameters

    • a: T
    • b: T

    Returns number

  • Generates an array of indexes from the source in order of their expected internalSort without modifying the source.

    Returns

    Parameters

    • source: T[]

    Returns number[]

Generated using TypeDoc