Static Readonly identityDetermines whether all elements of a sequence satisfy a condition.
A function to test each element for a condition.
true if every element of the source sequence passes the test in the specified predicate, or if the sequence is empty; otherwise, false.
Appends a value to the end of the sequence.
Rest ...elements: T[]The value(s) to append to source.
A new sequence that ends with element.
This method is implemented by using deferred execution. The immediate return value is an object that stores all the information that is required to perform the action. The query represented by this method is not executed until the object is enumerated either by calling its toArray method directly or by using for...of.
Computes the average of a sequence of values that are obtained by invoking a transform function on each element of the input sequence.
A transform function to apply to each element.
The average of the sequence of values, or 0 if the source sequence is empty.
Optional selector: SelectorFunction<number, number>Returns a number that represents how many elements in the specified sequence satisfy a condition.
Optional predicate: PredicateFunction<T>A function to test each element for a condition.
A number that represents how many elements in the sequence satisfy the condition in the predicate function.
Returns the elements of the specified sequence or the specified value as a singleton collection if the sequence is empty.
The value to return if the sequence is empty.
A sequence that contains defaultValue if source is empty; otherwise, source
This method is implemented by using deferred execution. The immediate return value is an object that stores all the information that is required to perform the action. The query represented by this method is not executed until the object is enumerated either by calling its toArray method directly or by using for...of.
Produces the symmetrical set difference of two sequences by using the specified ComparatorFunction
A sequence whose elements that also occur in the first sequence will cause those elements to be removed from the returned sequence.
Optional comparator: ComparatorFunction<T>Optional. A ComparatorFunction
A sequence that contains the symmetrical set difference of the elements of two sequences.
This method is implemented by using deferred execution. The immediate return value is an object that stores all the information that is required to perform the action. The query represented by this method is not executed until the object is enumerated either by calling its toArray method directly or by using for...of.
Returns distinct elements from a sequence by using a specified ComparatorFunction
Optional comparator: ComparatorFunction<T>Optional. A ComparatorFunction
A sequence that contains distinct elements from the source sequence.
This method is implemented by using deferred execution. The immediate return value is an object that stores all the information that is required to perform the action. The query represented by this method is not executed until the object is enumerated either by calling its toArray method directly or by using for...of.
Produces the set difference of two sequences by using the specified ComparatorFunction
A sequence whose elements that also occur in the first sequence will cause those elements to be removed from the returned sequence.
Optional comparator: ComparatorFunction<T>Optional. A ComparatorFunction
A sequence that contains the set difference of the elements of two sequences.
This method is implemented by using deferred execution. The immediate return value is an object that stores all the information that is required to perform the action. The query represented by this method is not executed until the object is enumerated either by calling its toArray method directly or by using for...of.
Returns the first element of a sequence, or a default value if the sequence contains no elements.
The default value.
Optional predicate: PredicateFunction<T>A function to test each element for a condition.
The first element, or a default value if the sequence contains no elements.
Groups the elements of a sequence according to a specified key selector function and projects the elements for each group by using a specified function.
A function to extract the key for each element.
A Map where each entry contains a collection of objects of type T.
Groups the elements of a sequence according to a specified key selector function and projects the elements for each group by using a specified function.
A function to extract the key for each element.
Optional elementSelector: SelectorFunction<T, V>A function to map each source element to an element in the returned Map.
A Map where each entry contains a collection of objects of type V.
Inserts a value into the source sequence at the specified index.
The value to insert to source.
The index at which to insert element.
A new sequence that contains element at index.
This method is implemented by using deferred execution. The immediate return value is an object that stores all the information that is required to perform the action. The query represented by this method is not executed until the object is enumerated either by calling its toArray method directly or by using for...of.
Produces the set intersection of two sequences.
A sequence whose distinct elements that also appear in the first sequence will be returned.
Optional comparator: ComparatorFunction<T>A ComparatorFunction
A sequence that contains the elements that form the set intersection of two sequences.
This method is implemented by using deferred execution. The immediate return value is an object that stores all the information that is required to perform the action. The query represented by this method is not executed until the object is enumerated either by calling its toArray method directly or by using for...of.
Correlates the elements of two sequences based on matching keys.
The sequence to join to the first sequence.
A function to extract the join key from each element of the first sequence.
A function to extract the join key from each element of the second sequence.
A function to create a result element from two matching elements.
A sequence that has elements of type U that are obtained by performing an inner join on two sequences.
This method is implemented by using deferred execution. The immediate return value is an object that stores all the information that is required to perform the action. The query represented by this method is not executed until the object is enumerated either by calling its toArray method directly or by using for...of.
Returns the last element of a sequence.
Optional predicate: PredicateFunction<T>A function to test each element for a condition.
The value at the last position in the source sequence.
If the source sequence contains no elements or the predicate did not match any elements.
Returns the last element of a sequence, or a default value if no element is found.
The default value.
Optional predicate: PredicateFunction<T>A function to test each element for a condition.
The value at the last position in the source sequence.
Invokes a transform function on each element of a sequence and returns the maximum value.
A transform function to apply to each element.
The maximum value in the sequence.
Optional selector: SelectorFunction<number, number>Invokes a transform function on each element of a sequence and returns the minimum value.
A transform function to apply to each element.
The minimum value in the sequence.
Optional selector: SelectorFunction<number, number>Sorts the elements of a sequence in ascending order according to a key.
A function to extract a key from an element.
A sequence whose elements are sorted according to a key.
Sorts the elements of a sequence in ascending or descending order according to a key.
A function to extract a key from an element.
Whether to sort in descending order rather than ascending.
A sequence whose elements are sorted according to a key.
Sorts the elements of a sequence in ascending order by using a specified comparator.
A function to extract a key from an element.
A ComparatorFunction
A sequence whose elements are sorted according to a key.
Sorts the elements of a sequence in ascending or descending order by using a specified comparator.
A function to extract a key from an element.
A ComparatorFunction
Whether to sort in descending order rather than ascending.
A sequence whose elements are sorted according to a key.
Sorts the elements of a sequence in descending order according to a key.
A function to extract a key from an element.
A sequence whose elements are sorted according to a key.
Sorts the elements of a sequence in descending order by using a specified comparator.
A function to extract a key from an element.
A ComparatorFunction
A sequence whose elements are sorted according to a key.
Adds a value to the beginning of the sequence.
Rest ...elements: T[]The value(s) to prepend to source.
A new sequence that begins with element.
This method is implemented by using deferred execution. The immediate return value is an object that stores all the information that is required to perform the action. The query represented by this method is not executed until the object is enumerated either by calling its toArray method directly or by using for...of.
Projects each element of a sequence into a new form.
A transform function to apply to each element.
An iterable whose elements are the result of invoking the transform function on each element of source.
Projects each element of a sequence to an IterableIterator and flattens the resulting sequences into one sequence.
A transform function to apply to each element.
An sequence whose elements are the result of invoking the one-to-many transform function on each element of the input sequence.
Determines whether two sequences are equal by comparing their elements by using a specified
ComparatorFunction
A sequence to compare to the first sequence.
Optional comparator: ComparatorFunction<T>A ComparatorFunction
true if the two source sequences are of equal length and their corresponding elements compare equal according to comparator; otherwise, false.
Returns the only element of a sequence, and throws an exception if there is not exactly one element in the sequence.
Optional predicate: PredicateFunction<T>A function to test an element for a condition. Return true to keep the element, false otherwise.
The single element of the input sequence that satisfies a condition.
If no element satisfies the condition in predicate, or more than one element satisfies the condition in predicate, or the source sequence is empty.
Returns the only element of a sequence that satisfies a specified condition or a default value if no such element exists; this method throws an exception if more than one element satisfies the condition.
The default value.
Optional predicate: PredicateFunction<T>A function to test an element for a condition. Return true to keep the element, false otherwise.
The single element of the input sequence that satisfies a condition.
If more than one element satisfies the condition in predicate.
Bypasses a specified number of elements in a sequence and then returns the remaining elements.
The number of elements to skip before returning the remaining elements.
An iterable that contains the elements that occur after the specified index in the input sequence.
Bypasses elements in a sequence as long as a specified condition is true and then returns the remaining elements.
A function to test each element for a condition.
A sequence that contains the elements from the input sequence starting at the first element in the linear series that does not pass the test specified by predicate.
Computes the sum of the sequence of values that are obtained by invoking a transform function on each element of the input sequence.
A transform function to apply to each element.
The sum of the projected values.
Optional selector: SelectorFunction<number, number>Returns elements from a sequence as long as a specified condition is true.
A function to test each element for a condition.
A sequence that contains the elements from the input sequence that occur before the element at which the test no longer passes.
Creates a Map from a sequence of IterableIterator<[T1, T2]>
A Map that contains keys and values.
Creates a Map from an Array according to a specified key selector function.
A function to extract a key from each element.
A Map that contains keys and values.
Creates a Map from an Array according to a specified key selector function.
A function to extract a key from each element.
A function to map each source element to an element in the returned Map.
A Map that contains keys and values.
Produces the set union of two sequences.
A sequence whose distinct elements form the second set for the union.
Optional comparator: ComparatorFunction<T>The ComparatorFunction
A sequence that contains the elements from both input sequences, excluding duplicates.
This method is implemented by using deferred execution. The immediate return value is an object that stores all the information that is required to perform the action. The query represented by this method is not executed until the object is enumerated either by calling its toArray method directly or by using for...of.
Filters a sequence of values based on a predicate.
A function to test each element for a condition. Return true to keep the element, false otherwise.
An iterable that contains elements from the input sequence that satisfy the condition.
Applies a specified function to the corresponding elements of two sequences, producing a sequence of the results.
The second sequence to merge.
A function that specifies how to merge the elements from the two sequences.
A sequence that contains merged elements of two input sequences.
Static aggregateApplies an accumulator function over a sequence. The specified seed value is used as the initial accumulator value.
The sequence to aggregate over.
An accumulator function to be invoked on each element.
Optional seed: UThe initial accumulator value.
The final accumulator value.
Static allDetermines whether all elements of a sequence satisfy a condition.
The sequence that contains the elements to apply the predicate to.
A function to test each element for a condition.
true if every element of the source sequence passes the test in the specified predicate, or if the sequence is empty; otherwise, false.
Static anyDetermines whether any element of a sequence satisfies a condition.
The sequence whose elements to apply the predicate to.
A function to test each element for a condition.
true if any elements in the source sequence pass the test in the specified predicate; otherwise, false.
Static appendAppends a value to the end of the sequence.
A sequence of values.
Rest ...elements: T[]The value(s) to append to source.
A new sequence that ends with element.
This method is implemented by using deferred execution. The immediate return value is an object that stores all the information that is required to perform the action. The query represented by this method is not executed until the object is enumerated either by calling its toArray method directly or by using for...of.
Static averageComputes the average of a sequence of values that are obtained by invoking a transform function on each element of the input sequence.
A sequence of values that are used to calculate an average.
A transform function to apply to each element.
The average of the sequence of values, or 0 if the source sequence is empty.
Optional selector: SelectorFunction<T, number>Static concatConcatenates two sequences.
The first sequence to concatenate.
The sequence to concatenate to the first sequence.
A sequence that contains the concatenated elements of the two input sequences.
Static countReturns a number that represents how many elements in the specified sequence satisfy a condition.
The sequence to return elements from.
Optional predicate: PredicateFunction<T>A function to test each element for a condition.
A number that represents how many elements in the sequence satisfy the condition in the predicate function.
Static defaultReturns the elements of the specified sequence or the specified value as a singleton collection if the sequence is empty.
The sequence to return the specified value for if it is empty.
The value to return if the sequence is empty.
A sequence that contains defaultValue if source is empty; otherwise, source.
This method is implemented by using deferred execution. The immediate return value is an object that stores all the information that is required to perform the action. The query represented by this method is not executed until the object is enumerated either by calling its toArray method directly or by using for...of.
Static disjunctiveProduces the symmetrical set difference of two sequences by using the specified ComparatorFunction
A sequence whose elements that also occur in the second sequence will cause those elements to be removed from the returned sequence.
A sequence whose elements that also occur in the first sequence will cause those elements to be removed from the returned sequence.
Optional comparator: ComparatorFunction<T>Optional. A ComparatorFunction
A sequence that contains the symmetrical set difference of the elements of two sequences.
This method is implemented by using deferred execution. The immediate return value is an object that stores all the information that is required to perform the action. The query represented by this method is not executed until the object is enumerated either by calling its toArray method directly or by using for...of.
Static distinctReturns distinct elements from a sequence by using a specified ComparatorFunction
The sequence to remove duplicate elements from.
Optional comparator: ComparatorFunction<T>Optional. A ComparatorFunction
A sequence that contains distinct elements from the source sequence.
This method is implemented by using deferred execution. The immediate return value is an object that stores all the information that is required to perform the action. The query represented by this method is not executed until the object is enumerated either by calling its toArray method directly or by using for...of.
Static emptyStatic exceptProduces the set difference of two sequences by using the specified ComparatorFunction
A sequence whose elements that are not also in second will be returned.
A sequence whose elements that also occur in the first sequence will cause those elements to be removed from the returned sequence.
Optional comparator: ComparatorFunction<T>Optional. A ComparatorFunction
A sequence that contains the set difference of the elements of two sequences.
This method is implemented by using deferred execution. The immediate return value is an object that stores all the information that is required to perform the action. The query represented by this method is not executed until the object is enumerated either by calling its toArray method directly or by using for...of.
Static firstReturns the first element of a sequence.
The sequence to return an element from.
Optional predicate: PredicateFunction<T>A function to test each element for a condition.
The first element.
If the source sequence contains no elements or the predicate did not match any elements.
Static firstReturns the first element of a sequence, or a default value if the sequence contains no elements.
The sequence to return an element from.
The default value.
Optional predicate: PredicateFunction<T>A function to test each element for a condition.
The first element, or a default value if the sequence contains no elements.
Static forStatic groupGroups the elements of a sequence according to a specified key selector function and projects the elements for each group by using a specified function.
The sequence whose elements to group.
A function to extract the key for each element.
A Map where each entry contains a collection of objects of type V.
Groups the elements of a sequence according to a specified key selector function and projects the elements for each group by using a specified function.
The sequence whose elements to group.
A function to extract the key for each element.
Optional elementSelector: SelectorFunction<T, V>A function to map each source element to an element in the returned Map.
A Map where each entry contains a collection of objects of type V.
Static insertInserts a value into the source sequence at the specified index.
The sequence in which to insert the new item.
The value to insert to source.
The index at which to insert element.
A new sequence that contains element at index.
This method is implemented by using deferred execution. The immediate return value is an object that stores all the information that is required to perform the action. The query represented by this method is not executed until the object is enumerated either by calling its toArray method directly or by using for...of.
Static intersectProduces the set intersection of two sequences.
A sequence whose distinct elements that also appear in second will be returned.
A sequence whose distinct elements that also appear in the first sequence will be returned.
Optional comparator: ComparatorFunction<T>A ComparatorFunction
A sequence that contains the elements that form the set intersection of two sequences.
This method is implemented by using deferred execution. The immediate return value is an object that stores all the information that is required to perform the action. The query represented by this method is not executed until the object is enumerated either by calling its toArray method directly or by using for...of.
Static joinCorrelates the elements of two sequences based on matching keys.
The first sequence to join.
The sequence to join to the first sequence.
A function to extract the join key from each element of the first sequence.
A function to extract the join key from each element of the second sequence.
A function to create a result element from two matching elements.
A sequence that has elements of type U that are obtained by performing an inner join on two sequences.
This method is implemented by using deferred execution. The immediate return value is an object that stores all the information that is required to perform the action. The query represented by this method is not executed until the object is enumerated either by calling its toArray method directly or by using for...of.
Static lastReturns the last element of a sequence.
A sequence to return the last element of.
Optional predicate: PredicateFunction<T>A function to test each element for a condition.
The value at the last position in the source sequence.
If the source sequence contains no elements or the predicate did not match any elements.
Static lastReturns the last element of a sequence, or a default value if no element is found.
A sequence to return the last element of.
The default value.
Optional predicate: PredicateFunction<T>A function to test each element for a condition.
The value at the last position in the source sequence.
Static maxInvokes a transform function on each element of a sequence and returns the maximum value.
A sequence of values to determine the maximum value of.
A transform function to apply to each element.
The maximum value in the sequence.
Optional selector: SelectorFunction<T, number>Static minInvokes a transform function on each element of a sequence and returns the minimum value.
A sequence of values to determine the minimum value of.
A transform function to apply to each element.
The minimum value in the sequence.
Optional selector: SelectorFunction<T, number>Static orderSorts the elements of a sequence in ascending order according to a key.
A sequence of values to order.
A function to extract a key from an element.
A sequence whose elements are sorted according to a key.
Sorts the elements of a sequence in ascending or descending order according to a key.
A sequence of values to order.
A function to extract a key from an element.
Whether to sort in descending order rather than ascending.
A sequence whose elements are sorted according to a key.
Sorts the elements of a sequence in ascending order by using a specified comparator.
A sequence of values to order.
A function to extract a key from an element.
A ComparatorFunction
A sequence whose elements are sorted according to a key.
Sorts the elements of a sequence in ascending or descending order by using a specified comparator.
A sequence of values to order.
A function to extract a key from an element.
A ComparatorFunction
Whether to sort in descending order rather than ascending.
A sequence whose elements are sorted according to a key.
Static orderSorts the elements of a sequence in descending order according to a key.
A sequence of values to order.
A function to extract a key from an element.
A sequence whose elements are sorted according to a key.
Sorts the elements of a sequence in descending order by using a specified comparator.
A sequence of values to order.
A function to extract a key from an element.
A ComparatorFunction
A sequence whose elements are sorted according to a key.
Static partitionPartitions the sequence into arrays of specified size.
The sequence whose elements to partition.
The size of each partitioned array. The last array may be smaller if there are not enough elements in the sequence to fill it.
A sequence that contains the partitioned arrays.
Static prependAdds a value to the beginning of the sequence.
A sequence of values.
Rest ...elements: T[]The value(s) to prepend to source.
A new sequence that begins with element.
This method is implemented by using deferred execution. The immediate return value is an object that stores all the information that is required to perform the action. The query represented by this method is not executed until the object is enumerated either by calling its toArray method directly or by using for...of.
Static rangeGenerates a sequence of integral numbers within a specified range.
The value of the first integer in the sequence.
The number of sequential integers to generate.
A sequence that contains a range of sequential integral numbers.
If count is less than 0.
This method is implemented by using deferred execution. The immediate return value is an object that stores all the information that is required to perform the action. The query represented by this method is not executed until the object is enumerated either by calling its toArray method directly or by using for...of.
Static repeatGenerates a sequence that contains one repeated value.
The value to be repeated.
The number of times to repeat the value in the generated sequence.
A sequence that contains a repeated value.
If count is less than 0.
This method is implemented by using deferred execution. The immediate return value is an object that stores all the information that is required to perform the action. The query represented by this method is not executed until the object is enumerated either by calling its toArray method directly or by using for...of.
Static repeatGenerates a sequence that contains the results of a repeated action.
The number of times to repeat the action in the generated sequence.
A sequence that contains the results of the repeated action.
If count is less than 0.
This method is implemented by using deferred execution. The immediate return value is an object that stores all the information that is required to perform the action. The query represented by this method is not executed until the object is enumerated either by calling its toArray method directly or by using for...of.
Static reverseStatic selectProjects each element of a sequence into a new form.
An iterable of values to invoke a transform function on.
A transform function to apply to each element.
An iterable whose elements are the result of invoking the transform function on each element of source.
Static selectProjects each element of a sequence to an IterableIterator and flattens the resulting sequences into one sequence.
A sequence of values to project.
A transform function to apply to each element.
An sequence whose elements are the result of invoking the one-to-many transform function on each element of the input sequence.
Static sequenceDetermines whether two sequences are equal by comparing their elements by using a specified
ComparatorFunction
A sequence to compare to second.
A sequence to compare to the first sequence.
A ComparatorFunction
true if the two source sequences are of equal length and their corresponding elements compare equal according to comparator; otherwise, false.
Static singleReturns the only element of a sequence, and throws an exception if there is not exactly one element in the sequence.
An iterable to return the single element of.
Optional predicate: PredicateFunction<T>A function to test an element for a condition. Return true to keep the element, false otherwise.
The single element of the input sequence that satisfies a condition.
If no element satisfies the condition in predicate, or more than one element satisfies the condition in predicate, or the source sequence is empty.
Static singleReturns the only element of a sequence that satisfies a specified condition or a default value if no such element exists; this method throws an exception if more than one element satisfies the condition.
A sequence to return the single element from.
The default value.
Optional predicate: PredicateFunction<T>A function to test an element for a condition. Return true to keep the element, false otherwise.
The single element of the input sequence that satisfies the condition, or defaultValue if no such element is found.
If more than one element satisfies the condition in predicate.
Static skipBypasses a specified number of elements in a sequence and then returns the remaining elements.
The sequence to return elements from.
The number of elements to skip before returning the remaining elements.
An iterable that contains the elements that occur after the specified index in the input sequence.
Static skipBypasses elements in a sequence as long as a specified condition is true and then returns the remaining elements.
A sequence to return elements from.
A function to test each element for a condition.
A sequence that contains the elements from the input sequence starting at the first element in the linear series that does not pass the test specified by predicate.
Static sumComputes the sum of the sequence of values that are obtained by invoking a transform function on each element of the input sequence.
A sequence of values that are used to calculate a sum.
A transform function to apply to each element.
The sum of the projected values.
Optional selector: SelectorFunction<T, number>Static takeReturns a specified number of contiguous elements from the start of a sequence.
The sequence to return elements from.
The number of elements to return.
An iterable that contains the specified number of elements from the start of the input sequence.
Static takeReturns elements from a sequence as long as a specified condition is true.
A sequence to return elements from.
A function to test each element for a condition.
A sequence that contains the elements from the input sequence that occur before the element at which the test no longer passes.
Static toStatic toCreates a Map from a sequence of IterableIterator<[T1, T2]>
The sequence to create a Map<K, T> from.
A Map that contains keys and values.
Creates a Map from an Array according to a specified key selector function.
The sequence to create a Map<K, T> from.
A function to extract a key from each element.
A Map that contains keys and values.
Creates a Map from an Array according to a specified key selector function.
The sequence to create a Map<K, T> from.
A function to extract a key from each element.
A function to map each source element to an element in the returned Map.
A Map that contains keys and values.
Static toStatic toStatic unionProduces the set union of two sequences.
A sequence whose distinct elements form the first set for the union.
A sequence whose distinct elements form the second set for the union.
Optional comparator: ComparatorFunction<T>The ComparatorFunction
A sequence that contains the elements from both input sequences, excluding duplicates.
This method is implemented by using deferred execution. The immediate return value is an object that stores all the information that is required to perform the action. The query represented by this method is not executed until the object is enumerated either by calling its toArray method directly or by using for...of.
Static whereFilters a sequence of values based on a predicate.
An iterable to filter.
A function to test each element for a condition. Return true to keep the element, false otherwise.
An iterable that contains elements from the input sequence that satisfy the condition.
Static zipApplies a specified function to the corresponding elements of two sequences, producing a sequence of the results.
The first sequence to merge.
The second sequence to merge.
A function that specifies how to merge the elements from the two sequences.
A sequence that contains merged elements of two input sequences.
Applies an accumulator function over a sequence. The specified seed value is used as the initial accumulator value.