OrderedQuery Class
Package: @esfx/iter-query
Represents an ordered sequence of elements.
Declaration
export declare class OrderedQuery<T> extends Query<T> implements OrderedIterable<T>
Inherited Members
Constructors
constructor(source)
Constructs a new instance of the OrderedQuery
class
Declaration
constructor(source: OrderedIterable<T>);
Parameters
- source
- OrderedIterable<T>
Methods
[OrderedIterable.thenBy](keySelector, comparer, descending)
Declaration
[OrderedIterable.thenBy]<K>(keySelector: (element: T) => K, comparer: Comparison<K> | Comparer<K>, descending: boolean): OrderedIterable<T>;
Type Parameters
- K
Parameters
- keySelector
- (element: T) => K
- comparer
- Comparison<K> | Comparer<K>
- descending
- boolean
Returns
thenBy(keySelector, comparer)
Creates a subsequent ordered subquery whose elements are sorted in ascending order by the provided key.
Declaration
thenBy<K>(keySelector: (element: T) => K, comparer?: Comparison<K> | Comparer<K>): OrderedQuery<T>;
Type Parameters
- K
Parameters
- keySelector
- (element: T) => K
A callback used to select the key for an element.
Returns
OrderedQuery<T>
thenByDescending(keySelector, comparer)
Creates a subsequent ordered subquery whose elements are sorted in descending order by the provided key.
Declaration
thenByDescending<K>(keySelector: (element: T) => K, comparer?: Comparison<K> | Comparer<K>): OrderedQuery<T>;
Type Parameters
- K
Parameters
- keySelector
- (element: T) => K
A callback used to select the key for an element.
Returns
OrderedQuery<T>