@tsdotnet/compare - v1.5.1
    Preparing search index...

    Class SortContext<T>

    A class for helping in complex sorting patterns.

    Type Parameters

    • T

    Hierarchy (View Summary)

    Implements

    • Comparer<T>
    Index

    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.

      Parameters

      Returns number

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

      Parameters

      • source: T[]

      Returns number[]