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