Class SortConditionCollection$1<T>

An ordered collection of sort conditions which are applied to a sort-able regions in a worksheet.

The sort conditions in the collection are applied in order to the data.

Note: The collection can hold a maximum of 64 sort condition.

See

SortSettings`1.sortConditions

Type Parameters

Hierarchy

Hierarchy

  • Base
    • SortConditionCollection$1

Implements

Constructors

Properties

$type: Type
$t: Type
nextHashCode: number

Accessors

  • get count(): number
  • Gets the number of sort conditions in the collection.

    Returns number

Methods

  • Adds a sort condition to the collection.

    Throws

    ArgumentNullException 'sortableItem' is null.

    Throws

    ArgumentNullException 'sortCondition' is null.

    Throws

    ArgumentException 'sortableItem' is already has a sort condition applied to it in the collection.

    Throws

    InvalidOperationException There are already 64 sort conditions in the collection.

    Parameters

    • sortableItem: T

      The sort-able item over which the sort condition will be applied.

    • sortCondition: SortCondition

      The sort condition to apply to the sort-able item.

    Returns void

  • Adds a range of sort conditions to the collection.

    Throws

    ArgumentNullException 'entries' is null.

    Throws

    ArgumentNullException If any sort condition is null.

    Throws

    ArgumentException If any sortable item is already has a sort condition applied to it in the collection.

    Throws

    InvalidOperationException There are already 64 sort conditions in the collection.

    Parameters

    • entries: IEnumerable$1<KeyValuePair$2<T, SortCondition>>

      An enumberable of entries which contain the sort-able item over which the sort condition will be applied and the sort condition to apply to the sort-able item.

    Returns void

  • Clears the collection.

    Returns void

  • Determines whether the specified sort condition is in the collection.

    Throws

    ArgumentNullException 'sortCondition' is null.

    Returns

    True if the sort condition is in the collection; False otherwise.

    Parameters

    • sortCondition: SortCondition

      The sort condition to find in the collection.

    Returns boolean

  • Determines whether the specified sort-able item is in the collection.

    Throws

    ArgumentNullException 'sortableItem' is null.

    Returns

    True if the sort-able item is in the collection; False otherwise.

    Parameters

    • sortableItem: T

      The sort-able item to find in the collection.

    Returns boolean

  • Parameters

    • other: any

    Returns boolean

  • Returns number

  • Gets the index of the specified sort condition in the collection.

    Throws

    ArgumentNullException 'sortCondition' is null.

    Returns

    The 0-based index of the specified sort condition in the collection or -1 if the item is not in the collection.

    Parameters

    • sortCondition: SortCondition

      The sort condition to find in the collection.

    Returns number

  • Gets the index of the specified sort-able item in the collection.

    Throws

    ArgumentNullException 'sortableItem' is null.

    Returns

    The 0-based index of the specified sort-able item in the collection or -1 if the item is not in the collection.

    Parameters

    • sortableItem: T

      The sort-able item to find in the collection.

    Returns number

  • Inserts a sort condition into the collection.

    Throws

    ArgumentOutOfRangeException 'index' is less than 0 or greater than count.

    Throws

    ArgumentNullException 'sortableItem' is null.

    Throws

    ArgumentNullException 'sortCondition' is null.

    Throws

    ArgumentException 'sortableItem' is already has a sort condition applied to it in the collection.

    Throws

    InvalidOperationException There are already 64 sort conditions in the collection.

    Parameters

    • index: number

      The 0-based index where the sort condition should be inserted.

    • sortableItem: T

      The sort-able item over which the sort condition will be applied.

    • sortCondition: SortCondition

      The sort condition to apply to the sort-able item.

    Returns void

  • Inserts a range of sort conditions into the collection.

    Throws

    ArgumentOutOfRangeException 'index' is less than 0 or greater than count.

    Throws

    ArgumentNullException 'entries' is null.

    Throws

    ArgumentNullException If any sort condition is null.

    Throws

    ArgumentException If any sortable item is already has a sort condition applied to it in the collection.

    Throws

    InvalidOperationException There are already 64 sort conditions in the collection.

    Parameters

    • index: number

      The 0-based index where the sort condition should be inserted.

    • entries: IEnumerable$1<KeyValuePair$2<T, SortCondition>>

      An enumberable of entries which contain the sort-able item over which the sort condition will be applied and the sort condition to apply to the sort-able item.

    Returns void

  • Gets or sets the sort condition for the specified sort-able item.

    Throws

    ArgumentNullException 'sortableItem' is null.

    Throws

    InvalidOperationException The sort-able item is not already in the collection and there are already 64 sort conditions in the collection.

    Parameters

    • sortableItem: T

      The sort-able item for which to get or set the sort condition.

    • Optional value: SortCondition

    Returns SortCondition

  • Gets or sets the pair of item and sort condition at the specified index.

    Throws

    ArgumentNullException The Key or Value of the assigned value is null.

    Throws

    InvalidOperationException The Key of the assigned value already in the collection at a different index.

    Parameters

    • index: number

      The index at which to get the pair of item and sort condition.

    • Optional value: KeyValuePair$2<T, SortCondition>

    Returns KeyValuePair$2<T, SortCondition>

  • Removes a sort condition from the collection.

    Throws

    ArgumentNullException 'sortCondition' is null.

    Returns

    True if the sort condition was found and removed; False otherwise.

    Parameters

    • sortCondition: SortCondition

      The sort condition to remove from the collection.

    Returns boolean

  • Removes the sort condition at the specified index.

    Throws

    ArgumentOutOfRangeException 'index' is less than 0 or greater than or equal to count.

    Parameters

    • index: number

      The 0-based index of the sort condition to remove.

    Returns void

  • Removes a sort-able item from the collection.

    Throws

    ArgumentNullException 'sortableItem' is null.

    Returns

    True if the sort-able item was found and removed; False otherwise.

    Parameters

    • sortableItem: T

      The sort-able item to remove from the collection.

    Returns boolean

  • Clears the existing sort conditions from the collection and replaces them with new entries in a single atomic operation.

    Throws

    ArgumentNullException 'entries' is null.

    Throws

    ArgumentNullException If any sort condition is null.

    Throws

    ArgumentException If any sortable item is already has a sort condition applied to it in the collection.

    Throws

    InvalidOperationException There are more than 64 sort conditions.

    Parameters

    • entries: IEnumerable$1<KeyValuePair$2<T, SortCondition>>

      An enumberable of entries which contain the sort-able item over which the sort condition will be applied and the sort condition to apply to the sort-able item.

    Returns void

  • Parameters

    • item1: any
    • item2: any

    Returns number

  • Parameters

    • item1: any
    • item2: any

    Returns number

  • Parameters

    • item1: any
    • item2: any

    Returns boolean

  • Parameters

    • a: any
    • b: any

    Returns boolean

  • Parameters

    • obj: any

    Returns any[]

  • Parameters

    • obj: any

    Returns any[]

  • Parameters

    • obj: any

    Returns number

  • Parameters

    • a: any
    • b: any

    Returns boolean