Class QueryableDefaults
Queryable
interface.-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Non-leaf replayable queryable.static interface
Replayable.static class
Replayable queryable. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T> T
aggregate
(Queryable<T> queryable, FunctionExpression<Function2<T, T, T>> func) Applies an accumulator function over a sequence.static <T,
TAccumulate>
TAccumulateaggregate
(Queryable<T> queryable, TAccumulate seed, FunctionExpression<Function2<TAccumulate, T, TAccumulate>> func) Applies an accumulator function over a sequence.static <T,
TAccumulate, TResult>
TResultaggregate
(Queryable<T> queryable, TAccumulate seed, FunctionExpression<Function2<TAccumulate, T, TAccumulate>> func, FunctionExpression<Function1<TAccumulate, TResult>> selector) Applies an accumulator function over a sequence.static <T> boolean
all
(Queryable<T> queryable, FunctionExpression<Predicate1<T>> predicate) Determines whether all the elements of a sequence satisfy a condition.static <T> void
Determines whether a sequence contains any elements.static <T> boolean
any
(Queryable<T> queryable, FunctionExpression<Predicate1<T>> predicate) Determines whether any element of a sequence satisfies a condition.static <T> Queryable<T>
asQueryable
(Queryable<T> queryable) Converts a genericEnumerable<T>
to a genericIQueryable<T>
.static <T> BigDecimal
averageBigDecimal
(Queryable<T> queryable, FunctionExpression<BigDecimalFunction1<T>> selector) Computes the average of a sequence of Decimal values that is obtained by invoking a projection function on each element of the input sequence.static <T> double
averageDouble
(Queryable<T> queryable, FunctionExpression<DoubleFunction1<T>> selector) Computes the average of a sequence of Double values that is obtained by invoking a projection function on each element of the input sequence.static <T> float
averageFloat
(Queryable<T> queryable, FunctionExpression<FloatFunction1<T>> selector) Computes the average of a sequence of Float values that is obtained by invoking a projection function on each element of the input sequence.static <T> int
averageInteger
(Queryable<T> queryable, FunctionExpression<IntegerFunction1<T>> selector) Computes the average of a sequence of int values that is obtained by invoking a projection function on each element of the input sequence.static <T> long
averageLong
(Queryable<T> queryable, FunctionExpression<LongFunction1<T>> selector) Computes the average of a sequence of long values that is obtained by invoking a projection function on each element of the input sequence.static <T> BigDecimal
averageNullableBigDecimal
(Queryable<T> queryable, FunctionExpression<NullableBigDecimalFunction1<T>> selector) Computes the average of a sequence of nullable Decimal values that is obtained by invoking a projection function on each element of the input sequence.static <T> Double
averageNullableDouble
(Queryable<T> queryable, FunctionExpression<NullableDoubleFunction1<T>> selector) Computes the average of a sequence of nullable Double values that is obtained by invoking a projection function on each element of the input sequence.static <T> Float
averageNullableFloat
(Queryable<T> queryable, FunctionExpression<NullableFloatFunction1<T>> selector) Computes the average of a sequence of nullable Float values that is obtained by invoking a projection function on each element of the input sequence.static <T> Integer
averageNullableInteger
(Queryable<T> queryable, FunctionExpression<NullableIntegerFunction1<T>> selector) Computes the average of a sequence of nullable int values that is obtained by invoking a projection function on each element of the input sequence.static <T> Long
averageNullableLong
(Queryable<T> queryable, FunctionExpression<NullableLongFunction1<T>> selector) Computes the average of a sequence of nullable long values that is obtained by invoking a projection function on each element of the input sequence.static <T,
T2> Queryable<T2> Analogous to LINQ's Enumerable.Cast extension method.static <T> Queryable<T>
concat
(Queryable<T> queryable0, Enumerable<T> source2) Concatenates two sequences.static <T> boolean
Determines whether a sequence contains a specified element by using the default equality comparer.static <T> boolean
contains
(Queryable<T> queryable, T element, EqualityComparer comparer) Determines whether a sequence contains a specified element by using a specifiedEqualityComparer<T>
.static <T> int
Returns the number of elements in a sequence.static <T> int
count
(Queryable<T> queryable, FunctionExpression<Predicate1<T>> func) Returns the number of elements in the specified sequence that satisfies a condition.static <T> Queryable<T>
defaultIfEmpty
(Queryable<T> queryable) Returns the elements of the specified sequence or the type parameter's default value in a singleton collection if the sequence is empty.static <T> T
defaultIfEmpty
(Queryable<T> queryable, T value) Returns the elements of the specified sequence or the specified value in a singleton collection if the sequence is empty.static <T> Queryable<T>
Returns distinct elements from a sequence by using the default equality comparer to compare values.static <T> Queryable<T>
distinct
(Queryable<T> queryable, EqualityComparer comparer) Returns distinct elements from a sequence by using a specifiedEqualityComparer<T>
to compare values.static <T> T
Returns the element at a specified index in a sequence.static <T> T
elementAtOrDefault
(Queryable<T> queryable, int index) Returns the element at a specified index in a sequence or a default value if the index is out of range.static <T> Queryable<T>
except
(Queryable<T> queryable, Enumerable<T> enumerable) Produces the set difference of two sequences by using the default equality comparer to compare values.static <T> Queryable<T>
except
(Queryable<T> queryable, Enumerable<T> enumerable, EqualityComparer<T> comparer) Produces the set difference of two sequences by using the specifiedEqualityComparer<T>
to compare values.static <T> T
Returns the first element of a sequence.static <T> T
first
(Queryable<T> queryable, FunctionExpression<Predicate1<T>> predicate) Returns the first element of a sequence that satisfies a specified condition.static <T> T
firstOrDefault
(Queryable<T> queryable) Returns the first element of a sequence, or a default value if the sequence contains no elements.static <T> T
firstOrDefault
(Queryable<T> queryable, FunctionExpression<Predicate1<T>> predicate) Returns the first element of a sequence that satisfies a specified condition or a default value if no such element is found.groupBy
(Queryable<T> queryable, FunctionExpression<Function1<T, TKey>> keySelector) Groups the elements of a sequence according to a specified key selector function.groupBy
(Queryable<T> queryable, FunctionExpression<Function1<T, TKey>> keySelector, EqualityComparer comparer) Groups the elements of a sequence according to a specified key selector function and compares the keys by using a specified comparer.groupBy
(Queryable<T> queryable, FunctionExpression<Function1<T, TKey>> keySelector, FunctionExpression<Function1<T, TElement>> elementSelector) 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.groupBy
(Queryable<T> queryable, FunctionExpression<Function1<T, TKey>> keySelector, FunctionExpression<Function1<T, TElement>> elementSelector, EqualityComparer comparer) Groups the elements of a sequence and projects the elements for each group by using a specified function.static <T,
TKey, TElement, TResult>
Queryable<TResult>groupBy
(Queryable<T> queryable, FunctionExpression<Function1<T, TKey>> keySelector, FunctionExpression<Function1<T, TElement>> elementSelector, FunctionExpression<Function2<TKey, Enumerable<TElement>, TResult>> resultSelector) Groups the elements of a sequence according to a specified key selector function and creates a result value from each group and its key.static <T,
TKey, TElement, TResult>
Queryable<TResult>groupBy
(Queryable<T> queryable, FunctionExpression<Function1<T, TKey>> keySelector, FunctionExpression<Function1<T, TElement>> elementSelector, FunctionExpression<Function2<TKey, Enumerable<TElement>, TResult>> resultSelector, EqualityComparer<TKey> comparer) Groups the elements of a sequence according to a specified key selector function and creates a result value from each group and its key.groupByK
(Queryable<T> queryable, FunctionExpression<Function1<T, TKey>> keySelector, FunctionExpression<Function2<TKey, Enumerable<T>, TResult>> elementSelector) Groups the elements of a sequence according to a specified key selector function and creates a result value from each group and its key.static <T,
TKey, TResult>
Queryable<TResult>groupByK
(Queryable<T> queryable, FunctionExpression<Function1<T, TKey>> keySelector, FunctionExpression<Function2<TKey, Enumerable<T>, TResult>> elementSelector, EqualityComparer comparer) Groups the elements of a sequence according to a specified key selector function and creates a result value from each group and its key.static <TOuter,
TInner, TKey, TResult>
Queryable<TResult>groupJoin
(Queryable<TOuter> outer, Enumerable<TInner> inner, FunctionExpression<Function1<TOuter, TKey>> outerKeySelector, FunctionExpression<Function1<TInner, TKey>> innerKeySelector, FunctionExpression<Function2<TOuter, Enumerable<TInner>, TResult>> resultSelector) Correlates the elements of two sequences based on key equality and groups the results.static <TOuter,
TInner, TKey, TResult>
Enumerable<TResult>groupJoin
(Queryable<TOuter> outer, Enumerable<TInner> inner, FunctionExpression<Function1<TOuter, TKey>> outerKeySelector, FunctionExpression<Function1<TInner, TKey>> innerKeySelector, FunctionExpression<Function2<TOuter, Enumerable<TInner>, TResult>> resultSelector, EqualityComparer<TKey> comparer) Correlates the elements of two sequences based on key equality and groups the results.static <T> Queryable<T>
intersect
(Queryable<T> queryable, Enumerable<T> enumerable) Produces the set intersection of two sequences by using the default equality comparer to compare values.static <T> Queryable<T>
intersect
(Queryable<T> queryable, Enumerable<T> enumerable, EqualityComparer<T> comparer) Produces the set intersection of two sequences by using the specifiedEqualityComparer<T>
to compare values.static <TOuter,
TInner, TKey, TResult>
Queryable<TResult>join
(Queryable<TOuter> outer, Enumerable<TInner> inner, FunctionExpression<Function1<TOuter, TKey>> outerKeySelector, FunctionExpression<Function1<TInner, TKey>> innerKeySelector, FunctionExpression<Function2<TOuter, TInner, TResult>> resultSelector) Correlates the elements of two sequences based on matching keys.static <TOuter,
TInner, TKey, TResult>
Queryable<TResult>join
(Queryable<TOuter> outer, Enumerable<TInner> inner, FunctionExpression<Function1<TOuter, TKey>> outerKeySelector, FunctionExpression<Function1<TInner, TKey>> innerKeySelector, FunctionExpression<Function2<TOuter, TInner, TResult>> resultSelector, EqualityComparer<TKey> comparer) Correlates the elements of two sequences based on matching keys.static <T> T
Returns the last element in a sequence.static <T> T
last
(Queryable<T> queryable, FunctionExpression<Predicate1<T>> predicate) Returns the last element of a sequence that satisfies a specified condition.static <T> T
lastOrDefault
(Queryable<T> queryable) Returns the last element in a sequence, or a default value if the sequence contains no elements.static <T> T
lastOrDefault
(Queryable<T> queryable, FunctionExpression<Predicate1<T>> predicate) Returns the last element of a sequence that satisfies a condition or a default value if no such element is found.static <T> long
Returns an long that represents the total number of elements in a sequence.static <T> long
longCount
(Queryable<T> queryable, FunctionExpression<Predicate1<T>> predicate) Returns an long that represents the number of elements in a sequence that satisfy a condition.static <T> T
Returns the maximum value in a genericIQueryable<T>
.static <T,
TResult>
TResultmax
(Queryable<T> queryable, FunctionExpression<Function1<T, TResult>> selector) Invokes a projection function on each element of a genericIQueryable<T>
and returns the maximum resulting value.static <T> T
Returns the minimum value in a genericIQueryable<T>
.static <T,
TResult>
TResultmin
(Queryable<T> queryable, FunctionExpression<Function1<T, TResult>> selector) Invokes a projection function on each element of a genericIQueryable<T>
and returns the minimum resulting value.static <TResult> Queryable<TResult>
Filters the elements of an IQueryable based on a specified type.static <T,
TKey extends Comparable>
OrderedQueryable<T>orderBy
(Queryable<T> source, FunctionExpression<Function1<T, TKey>> keySelector) Sorts the elements of a sequence in ascending order according to a key.static <T,
TKey> OrderedQueryable<T> orderBy
(Queryable<T> source, FunctionExpression<Function1<T, TKey>> keySelector, Comparator<TKey> comparator) Sorts the elements of a sequence in ascending order by using a specified comparer.static <T,
TKey extends Comparable>
OrderedQueryable<T>orderByDescending
(Queryable<T> source, FunctionExpression<Function1<T, TKey>> keySelector) Sorts the elements of a sequence in descending order according to a key.static <T,
TKey> OrderedQueryable<T> orderByDescending
(Queryable<T> source, FunctionExpression<Function1<T, TKey>> keySelector, Comparator<TKey> comparator) Sorts the elements of a sequence in descending order by using a specified comparer.static <T> Queryable<T>
Inverts the order of the elements in a sequence.static <T,
TResult>
Queryable<TResult>select
(Queryable<T> source, FunctionExpression<Function1<T, TResult>> selector) Projects each element of a sequence into a new form.static <T,
TResult>
Queryable<TResult>selectMany
(Queryable<T> source, FunctionExpression<Function1<T, Enumerable<TResult>>> selector) Projects each element of a sequence to anEnumerable<T>
and combines the resulting sequences into one sequence.static <T,
TCollection, TResult>
Queryable<TResult>selectMany
(Queryable<T> source, FunctionExpression<Function2<T, Integer, Enumerable<TCollection>>> collectionSelector, FunctionExpression<Function2<T, TCollection, TResult>> resultSelector) Projects each element of a sequence to anEnumerable<T>
that incorporates the index of the source element that produced it.static <T,
TCollection, TResult>
Queryable<TResult>selectManyN
(Queryable<T> source, FunctionExpression<Function1<T, Enumerable<TCollection>>> collectionSelector, FunctionExpression<Function2<T, TCollection, TResult>> resultSelector) Projects each element of a sequence to anEnumerable<T>
and invokes a result selector function on each element therein.static <T,
TResult>
Queryable<TResult>selectManyN
(Queryable<T> source, FunctionExpression<Function2<T, Integer, Enumerable<TResult>>> selector) Projects each element of a sequence to anEnumerable<T>
and combines the resulting sequences into one sequence.static <T,
TResult>
Queryable<TResult>selectN
(Queryable<T> source, FunctionExpression<Function2<T, Integer, TResult>> selector) Projects each element of a sequence into a new form by incorporating the element's index.static <T> boolean
sequenceEqual
(Queryable<T> queryable, Enumerable<T> enumerable) Determines whether two sequences are equal by using the default equality comparer to compare elements.static <T> boolean
sequenceEqual
(Queryable<T> queryable, Enumerable<T> enumerable, EqualityComparer<T> comparer) Determines whether two sequences are equal by using a specifiedEqualityComparer<T>
to compare elements.static <T> T
Returns the only element of a sequence, and throws an exception if there is not exactly one element in the sequence.static <T> T
single
(Queryable<T> source, FunctionExpression<Predicate1<T>> predicate) Returns the only element of a sequence that satisfies a specified condition, and throws an exception if more than one such element exists.static <T> T
singleOrDefault
(Queryable<T> source) Returns the only element of a sequence, or a default value if the sequence is empty; this method throws an exception if there is more than one element in the sequence.static <T> T
singleOrDefault
(Queryable<T> source, FunctionExpression<Predicate1<T>> predicate) 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.static <T> Queryable<T>
Bypasses a specified number of elements in a sequence and then returns the remaining elements.static <T> Queryable<T>
skipWhile
(Queryable<T> source, FunctionExpression<Predicate1<T>> predicate) Bypasses elements in a sequence as long as a specified condition is true and then returns the remaining elements.static <T> Queryable<T>
skipWhileN
(Queryable<T> source, FunctionExpression<Predicate2<T, Integer>> predicate) Bypasses elements in a sequence as long as a specified condition is true and then returns the remaining elements.static <T> BigDecimal
sumBigDecimal
(Queryable<T> sources, FunctionExpression<BigDecimalFunction1<T>> selector) Computes the sum of the sequence of Decimal values that is obtained by invoking a projection function on each element of the input sequence.static <T> double
sumDouble
(Queryable<T> source, FunctionExpression<DoubleFunction1<T>> selector) Computes the sum of the sequence of Double values that is obtained by invoking a projection function on each element of the input sequence.static <T> float
sumFloat
(Queryable<T> source, FunctionExpression<FloatFunction1<T>> selector) Computes the sum of the sequence of Float values that is obtained by invoking a projection function on each element of the input sequence.static <T> int
sumInteger
(Queryable<T> source, FunctionExpression<IntegerFunction1<T>> selector) Computes the sum of the sequence of int values that is obtained by invoking a projection function on each element of the input sequence.static <T> long
sumLong
(Queryable<T> source, FunctionExpression<LongFunction1<T>> selector) Computes the sum of the sequence of long values that is obtained by invoking a projection function on each element of the input sequence.static <T> BigDecimal
sumNullableBigDecimal
(Queryable<T> source, FunctionExpression<NullableBigDecimalFunction1<T>> selector) Computes the sum of the sequence of nullable Decimal values that is obtained by invoking a projection function on each element of the input sequence.static <T> Double
sumNullableDouble
(Queryable<T> source, FunctionExpression<NullableDoubleFunction1<T>> selector) Computes the sum of the sequence of nullable Double values that is obtained by invoking a projection function on each element of the input sequence.static <T> Float
sumNullableFloat
(Queryable<T> source, FunctionExpression<NullableFloatFunction1<T>> selector) Computes the sum of the sequence of nullable Float values that is obtained by invoking a projection function on each element of the input sequence.static <T> Integer
sumNullableInteger
(Queryable<T> source, FunctionExpression<NullableIntegerFunction1<T>> selector) Computes the sum of the sequence of nullable int values that is obtained by invoking a projection function on each element of the input sequence.static <T> Long
sumNullableLong
(Queryable<T> source, FunctionExpression<NullableLongFunction1<T>> selector) Computes the sum of the sequence of nullable long values that is obtained by invoking a projection function on each element of the input sequence.static <T> Queryable<T>
Returns a specified number of contiguous elements from the start of a sequence.static <T> Queryable<T>
takeWhile
(Queryable<T> source, FunctionExpression<Predicate1<T>> predicate) Returns elements from a sequence as long as a specified condition is true.static <T> Queryable<T>
takeWhileN
(Queryable<T> source, FunctionExpression<Predicate2<T, Integer>> predicate) Returns elements from a sequence as long as a specified condition is true.static <T,
TKey extends Comparable<TKey>>
OrderedQueryable<T>thenBy
(OrderedQueryable<T> source, FunctionExpression<Function1<T, TKey>> keySelector) Performs a subsequent ordering of the elements in a sequence in ascending order according to a key.static <T,
TKey> OrderedQueryable<T> thenBy
(OrderedQueryable<T> source, FunctionExpression<Function1<T, TKey>> keySelector, Comparator<TKey> comparator) Performs a subsequent ordering of the elements in a sequence in ascending order according to a key, using a specified comparator.static <T,
TKey extends Comparable<TKey>>
OrderedQueryable<T>thenByDescending
(OrderedQueryable<T> source, FunctionExpression<Function1<T, TKey>> keySelector) Performs a subsequent ordering of the elements in a sequence in descending order according to a key.static <T,
TKey> OrderedQueryable<T> thenByDescending
(OrderedQueryable<T> source, FunctionExpression<Function1<T, TKey>> keySelector, Comparator<TKey> comparator) Performs a subsequent ordering of the elements in a sequence in dscending order according to a key, using a specified comparator.static <T> Queryable<T>
union
(Queryable<T> source0, Enumerable<T> source1) Produces the set union of two sequences by using the default equality comparer.static <T> Queryable<T>
union
(Queryable<T> source0, Enumerable<T> source1, EqualityComparer<T> comparer) Produces the set union of two sequences by using a specifiedEqualityComparer<T>
.static <T> Queryable<T>
where
(Queryable<T> source, FunctionExpression<Predicate1<T>> predicate) Filters a sequence of values based on a predicate.static <T> Queryable<T>
whereN
(Queryable<T> source, FunctionExpression<Predicate2<T, Integer>> predicate) Filters a sequence of values based on a predicate.static <T0,
T1, TResult>
Queryable<TResult>zip
(Queryable<T0> source0, Enumerable<T1> source1, FunctionExpression<Function2<T0, T1, TResult>> resultSelector) Merges two sequences by using the specified predicate function.
-
Constructor Details
-
QueryableDefaults
public QueryableDefaults()
-
-
Method Details
-
aggregate
Applies an accumulator function over a sequence. -
aggregate
public static <T,TAccumulate> TAccumulate aggregate(Queryable<T> queryable, TAccumulate seed, FunctionExpression<Function2<TAccumulate, T, TAccumulate>> func) Applies an accumulator function over a sequence. The specified seed value is used as the initial accumulator value. -
aggregate
public static <T,TAccumulate, TResult aggregateTResult> (Queryable<T> queryable, TAccumulate seed, FunctionExpression<Function2<TAccumulate, T, TAccumulate>> func, FunctionExpression<Function1<TAccumulate, TResult>> selector) Applies an accumulator function over a sequence. The specified seed value is used as the initial accumulator value, and the specified function is used to select the result value. -
all
Determines whether all the elements of a sequence satisfy a condition. -
any
Determines whether a sequence contains any elements. -
any
Determines whether any element of a sequence satisfies a condition. -
asQueryable
Converts a genericEnumerable<T>
to a genericIQueryable<T>
. -
averageBigDecimal
public static <T> BigDecimal averageBigDecimal(Queryable<T> queryable, FunctionExpression<BigDecimalFunction1<T>> selector) Computes the average of a sequence of Decimal values that is obtained by invoking a projection function on each element of the input sequence. -
averageNullableBigDecimal
public static <T> BigDecimal averageNullableBigDecimal(Queryable<T> queryable, FunctionExpression<NullableBigDecimalFunction1<T>> selector) Computes the average of a sequence of nullable Decimal values that is obtained by invoking a projection function on each element of the input sequence. -
averageDouble
public static <T> double averageDouble(Queryable<T> queryable, FunctionExpression<DoubleFunction1<T>> selector) Computes the average of a sequence of Double values that is obtained by invoking a projection function on each element of the input sequence. -
averageNullableDouble
public static <T> Double averageNullableDouble(Queryable<T> queryable, FunctionExpression<NullableDoubleFunction1<T>> selector) Computes the average of a sequence of nullable Double values that is obtained by invoking a projection function on each element of the input sequence. -
averageInteger
public static <T> int averageInteger(Queryable<T> queryable, FunctionExpression<IntegerFunction1<T>> selector) Computes the average of a sequence of int values that is obtained by invoking a projection function on each element of the input sequence. -
averageNullableInteger
public static <T> Integer averageNullableInteger(Queryable<T> queryable, FunctionExpression<NullableIntegerFunction1<T>> selector) Computes the average of a sequence of nullable int values that is obtained by invoking a projection function on each element of the input sequence. -
averageFloat
public static <T> float averageFloat(Queryable<T> queryable, FunctionExpression<FloatFunction1<T>> selector) Computes the average of a sequence of Float values that is obtained by invoking a projection function on each element of the input sequence. -
averageNullableFloat
public static <T> Float averageNullableFloat(Queryable<T> queryable, FunctionExpression<NullableFloatFunction1<T>> selector) Computes the average of a sequence of nullable Float values that is obtained by invoking a projection function on each element of the input sequence. -
averageLong
public static <T> long averageLong(Queryable<T> queryable, FunctionExpression<LongFunction1<T>> selector) Computes the average of a sequence of long values that is obtained by invoking a projection function on each element of the input sequence. -
averageNullableLong
public static <T> Long averageNullableLong(Queryable<T> queryable, FunctionExpression<NullableLongFunction1<T>> selector) Computes the average of a sequence of nullable long values that is obtained by invoking a projection function on each element of the input sequence. -
cast
Analogous to LINQ's Enumerable.Cast extension method.- Type Parameters:
T2
- Target type- Parameters:
clazz
- Target type- Returns:
- Collection of T2
-
concat
Concatenates two sequences. -
contains
Determines whether a sequence contains a specified element by using the default equality comparer. -
contains
Determines whether a sequence contains a specified element by using a specifiedEqualityComparer<T>
. -
count
Returns the number of elements in a sequence. -
count
Returns the number of elements in the specified sequence that satisfies a condition. -
defaultIfEmpty
Returns the elements of the specified sequence or the type parameter's default value in a singleton collection if the sequence is empty. -
defaultIfEmpty
Returns the elements of the specified sequence or the specified value in a singleton collection if the sequence is empty. -
distinct
Returns distinct elements from a sequence by using the default equality comparer to compare values. -
distinct
Returns distinct elements from a sequence by using a specifiedEqualityComparer<T>
to compare values. -
elementAt
Returns the element at a specified index in a sequence. -
elementAtOrDefault
Returns the element at a specified index in a sequence or a default value if the index is out of range. -
except
Produces the set difference of two sequences by using the default equality comparer to compare values. (Defined by Queryable.) -
except
public static <T> Queryable<T> except(Queryable<T> queryable, Enumerable<T> enumerable, EqualityComparer<T> comparer) Produces the set difference of two sequences by using the specifiedEqualityComparer<T>
to compare values. -
first
Returns the first element of a sequence. (Defined by Queryable.) -
first
Returns the first element of a sequence that satisfies a specified condition. -
firstOrDefault
Returns the first element of a sequence, or a default value if the sequence contains no elements. -
firstOrDefault
public static <T> T firstOrDefault(Queryable<T> queryable, FunctionExpression<Predicate1<T>> predicate) Returns the first element of a sequence that satisfies a specified condition or a default value if no such element is found. -
groupBy
public static <T,TKey> Queryable<Grouping<TKey,T>> groupBy(Queryable<T> queryable, FunctionExpression<Function1<T, TKey>> keySelector) Groups the elements of a sequence according to a specified key selector function. -
groupBy
public static <T,TKey> Queryable<Grouping<TKey,T>> groupBy(Queryable<T> queryable, FunctionExpression<Function1<T, TKey>> keySelector, EqualityComparer comparer) Groups the elements of a sequence according to a specified key selector function and compares the keys by using a specified comparer. -
groupBy
public static <T,TKey, Queryable<Grouping<TKey,TElement> TElement>> groupBy(Queryable<T> queryable, FunctionExpression<Function1<T, TKey>> keySelector, FunctionExpression<Function1<T, TElement>> elementSelector) 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. -
groupByK
public static <T,TKey, Queryable<Grouping<TKey,TResult> TResult>> groupByK(Queryable<T> queryable, FunctionExpression<Function1<T, TKey>> keySelector, FunctionExpression<Function2<TKey, Enumerable<T>, TResult>> elementSelector) Groups the elements of a sequence according to a specified key selector function and creates a result value from each group and its key.NOTE: Renamed from
groupBy
to distinguish fromgroupBy(org.apache.calcite.linq4j.Queryable, org.apache.calcite.linq4j.tree.FunctionExpression, org.apache.calcite.linq4j.tree.FunctionExpression)
, which has the same erasure. -
groupBy
public static <T,TKey, Queryable<Grouping<TKey,TElement> TElement>> groupBy(Queryable<T> queryable, FunctionExpression<Function1<T, TKey>> keySelector, FunctionExpression<Function1<T, TElement>> elementSelector, EqualityComparer comparer) Groups the elements of a sequence and projects the elements for each group by using a specified function. Key values are compared by using a specified comparer. -
groupByK
public static <T,TKey, Queryable<TResult> groupByKTResult> (Queryable<T> queryable, FunctionExpression<Function1<T, TKey>> keySelector, FunctionExpression<Function2<TKey, Enumerable<T>, TResult>> elementSelector, EqualityComparer comparer) Groups the elements of a sequence according to a specified key selector function and creates a result value from each group and its key. Keys are compared by using a specified comparer.NOTE: Renamed from
groupBy
to distinguish fromgroupBy(org.apache.calcite.linq4j.Queryable, org.apache.calcite.linq4j.tree.FunctionExpression, org.apache.calcite.linq4j.tree.FunctionExpression, org.apache.calcite.linq4j.function.EqualityComparer)
, which has the same erasure. -
groupBy
public static <T,TKey, Queryable<TResult> groupByTElement, TResult> (Queryable<T> queryable, FunctionExpression<Function1<T, TKey>> keySelector, FunctionExpression<Function1<T, TElement>> elementSelector, FunctionExpression<Function2<TKey, Enumerable<TElement>, TResult>> resultSelector) Groups the elements of a sequence according to a specified key selector function and creates a result value from each group and its key. The elements of each group are projected by using a specified function. -
groupBy
public static <T,TKey, Queryable<TResult> groupByTElement, TResult> (Queryable<T> queryable, FunctionExpression<Function1<T, TKey>> keySelector, FunctionExpression<Function1<T, TElement>> elementSelector, FunctionExpression<Function2<TKey, Enumerable<TElement>, TResult>> resultSelector, EqualityComparer<TKey> comparer) Groups the elements of a sequence according to a specified key selector function and creates a result value from each group and its key. Keys are compared by using a specified comparer and the elements of each group are projected by using a specified function. -
groupJoin
public static <TOuter,TInner, Queryable<TResult> groupJoinTKey, TResult> (Queryable<TOuter> outer, Enumerable<TInner> inner, FunctionExpression<Function1<TOuter, TKey>> outerKeySelector, FunctionExpression<Function1<TInner, TKey>> innerKeySelector, FunctionExpression<Function2<TOuter, Enumerable<TInner>, TResult>> resultSelector) Correlates the elements of two sequences based on key equality and groups the results. The default equality comparer is used to compare keys. -
groupJoin
public static <TOuter,TInner, Enumerable<TResult> groupJoinTKey, TResult> (Queryable<TOuter> outer, Enumerable<TInner> inner, FunctionExpression<Function1<TOuter, TKey>> outerKeySelector, FunctionExpression<Function1<TInner, TKey>> innerKeySelector, FunctionExpression<Function2<TOuter, Enumerable<TInner>, TResult>> resultSelector, EqualityComparer<TKey> comparer) Correlates the elements of two sequences based on key equality and groups the results. A specifiedEqualityComparer<T>
is used to compare keys. -
intersect
Produces the set intersection of two sequences by using the default equality comparer to compare values. (Defined by Queryable.) -
intersect
public static <T> Queryable<T> intersect(Queryable<T> queryable, Enumerable<T> enumerable, EqualityComparer<T> comparer) Produces the set intersection of two sequences by using the specifiedEqualityComparer<T>
to compare values. -
join
public static <TOuter,TInner, Queryable<TResult> joinTKey, TResult> (Queryable<TOuter> outer, Enumerable<TInner> inner, FunctionExpression<Function1<TOuter, TKey>> outerKeySelector, FunctionExpression<Function1<TInner, TKey>> innerKeySelector, FunctionExpression<Function2<TOuter, TInner, TResult>> resultSelector) Correlates the elements of two sequences based on matching keys. The default equality comparer is used to compare keys. -
join
public static <TOuter,TInner, Queryable<TResult> joinTKey, TResult> (Queryable<TOuter> outer, Enumerable<TInner> inner, FunctionExpression<Function1<TOuter, TKey>> outerKeySelector, FunctionExpression<Function1<TInner, TKey>> innerKeySelector, FunctionExpression<Function2<TOuter, TInner, TResult>> resultSelector, EqualityComparer<TKey> comparer) Correlates the elements of two sequences based on matching keys. A specifiedEqualityComparer<T>
is used to compare keys. -
last
Returns the last element in a sequence. (Defined by Queryable.) -
last
Returns the last element of a sequence that satisfies a specified condition. -
lastOrDefault
Returns the last element in a sequence, or a default value if the sequence contains no elements. -
lastOrDefault
public static <T> T lastOrDefault(Queryable<T> queryable, FunctionExpression<Predicate1<T>> predicate) Returns the last element of a sequence that satisfies a condition or a default value if no such element is found. -
longCount
Returns an long that represents the total number of elements in a sequence. -
longCount
public static <T> long longCount(Queryable<T> queryable, FunctionExpression<Predicate1<T>> predicate) Returns an long that represents the number of elements in a sequence that satisfy a condition. -
max
Returns the maximum value in a genericIQueryable<T>
. -
max
public static <T,TResult> TResult max(Queryable<T> queryable, FunctionExpression<Function1<T, TResult>> selector) Invokes a projection function on each element of a genericIQueryable<T>
and returns the maximum resulting value. -
min
Returns the minimum value in a genericIQueryable<T>
. -
min
public static <T,TResult> TResult min(Queryable<T> queryable, FunctionExpression<Function1<T, TResult>> selector) Invokes a projection function on each element of a genericIQueryable<T>
and returns the minimum resulting value. -
ofType
Filters the elements of an IQueryable based on a specified type.This method generates a
MethodCallExpression
that represents callingofType
itself as a constructed generic method. It then passes theMethodCallExpression
to thecreateQuery
method of theQueryProvider
represented by the Provider property of the source parameter.The query behavior that occurs as a result of executing an expression tree that represents calling OfType depends on the implementation of the type of the source parameter. The expected behavior is that it filters out any elements in source that are not of type TResult.
NOTE: clazz parameter not present in C# LINQ; necessary because of Java type erasure.
-
orderBy
public static <T,TKey extends Comparable> OrderedQueryable<T> orderBy(Queryable<T> source, FunctionExpression<Function1<T, TKey>> keySelector) Sorts the elements of a sequence in ascending order according to a key. -
orderBy
public static <T,TKey> OrderedQueryable<T> orderBy(Queryable<T> source, FunctionExpression<Function1<T, TKey>> keySelector, Comparator<TKey> comparator) Sorts the elements of a sequence in ascending order by using a specified comparer. -
orderByDescending
public static <T,TKey extends Comparable> OrderedQueryable<T> orderByDescending(Queryable<T> source, FunctionExpression<Function1<T, TKey>> keySelector) Sorts the elements of a sequence in descending order according to a key. -
orderByDescending
public static <T,TKey> OrderedQueryable<T> orderByDescending(Queryable<T> source, FunctionExpression<Function1<T, TKey>> keySelector, Comparator<TKey> comparator) Sorts the elements of a sequence in descending order by using a specified comparer. -
reverse
Inverts the order of the elements in a sequence. -
select
public static <T,TResult> Queryable<TResult> select(Queryable<T> source, FunctionExpression<Function1<T, TResult>> selector) Projects each element of a sequence into a new form. -
selectN
public static <T,TResult> Queryable<TResult> selectN(Queryable<T> source, FunctionExpression<Function2<T, Integer, TResult>> selector) Projects each element of a sequence into a new form by incorporating the element's index.NOTE: Renamed from
select
because had same erasure asselect(org.apache.calcite.linq4j.Queryable, org.apache.calcite.linq4j.tree.FunctionExpression)
. -
selectMany
public static <T,TResult> Queryable<TResult> selectMany(Queryable<T> source, FunctionExpression<Function1<T, Enumerable<TResult>>> selector) Projects each element of a sequence to anEnumerable<T>
and combines the resulting sequences into one sequence. -
selectManyN
public static <T,TResult> Queryable<TResult> selectManyN(Queryable<T> source, FunctionExpression<Function2<T, Integer, Enumerable<TResult>>> selector) Projects each element of a sequence to anEnumerable<T>
and combines the resulting sequences into one sequence. The index of each source element is used in the projected form of that element.NOTE: Renamed from
selectMany
because had same erasure asselectMany(org.apache.calcite.linq4j.Queryable, org.apache.calcite.linq4j.tree.FunctionExpression)
. -
selectMany
public static <T,TCollection, Queryable<TResult> selectManyTResult> (Queryable<T> source, FunctionExpression<Function2<T, Integer, Enumerable<TCollection>>> collectionSelector, FunctionExpression<Function2<T, TCollection, TResult>> resultSelector) Projects each element of a sequence to anEnumerable<T>
that incorporates the index of the source element that produced it. A result selector function is invoked on each element of each intermediate sequence, and the resulting values are combined into a single, one-dimensional sequence and returned. -
selectManyN
public static <T,TCollection, Queryable<TResult> selectManyNTResult> (Queryable<T> source, FunctionExpression<Function1<T, Enumerable<TCollection>>> collectionSelector, FunctionExpression<Function2<T, TCollection, TResult>> resultSelector) Projects each element of a sequence to anEnumerable<T>
and invokes a result selector function on each element therein. The resulting values from each intermediate sequence are combined into a single, one-dimensional sequence and returned.NOTE: Renamed from
selectMany
because had same erasure asselectMany(org.apache.calcite.linq4j.Queryable, org.apache.calcite.linq4j.tree.FunctionExpression, org.apache.calcite.linq4j.tree.FunctionExpression)
. -
sequenceEqual
Determines whether two sequences are equal by using the default equality comparer to compare elements. -
sequenceEqual
public static <T> boolean sequenceEqual(Queryable<T> queryable, Enumerable<T> enumerable, EqualityComparer<T> comparer) Determines whether two sequences are equal by using a specifiedEqualityComparer<T>
to compare elements. -
single
Returns the only element of a sequence, and throws an exception if there is not exactly one element in the sequence. -
single
Returns the only element of a sequence that satisfies a specified condition, and throws an exception if more than one such element exists. -
singleOrDefault
Returns the only element of a sequence, or a default value if the sequence is empty; this method throws an exception if there is more than one element in the sequence. -
singleOrDefault
public static <T> T singleOrDefault(Queryable<T> source, FunctionExpression<Predicate1<T>> predicate) 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. -
skip
Bypasses a specified number of elements in a sequence and then returns the remaining elements. -
skipWhile
public static <T> Queryable<T> skipWhile(Queryable<T> source, FunctionExpression<Predicate1<T>> predicate) Bypasses elements in a sequence as long as a specified condition is true and then returns the remaining elements. -
skipWhileN
public static <T> Queryable<T> skipWhileN(Queryable<T> source, FunctionExpression<Predicate2<T, Integer>> predicate) Bypasses elements in a sequence as long as a specified condition is true and then returns the remaining elements. The element's index is used in the logic of the predicate function. -
sumBigDecimal
public static <T> BigDecimal sumBigDecimal(Queryable<T> sources, FunctionExpression<BigDecimalFunction1<T>> selector) Computes the sum of the sequence of Decimal values that is obtained by invoking a projection function on each element of the input sequence. -
sumNullableBigDecimal
public static <T> BigDecimal sumNullableBigDecimal(Queryable<T> source, FunctionExpression<NullableBigDecimalFunction1<T>> selector) Computes the sum of the sequence of nullable Decimal values that is obtained by invoking a projection function on each element of the input sequence. -
sumDouble
public static <T> double sumDouble(Queryable<T> source, FunctionExpression<DoubleFunction1<T>> selector) Computes the sum of the sequence of Double values that is obtained by invoking a projection function on each element of the input sequence. -
sumNullableDouble
public static <T> Double sumNullableDouble(Queryable<T> source, FunctionExpression<NullableDoubleFunction1<T>> selector) Computes the sum of the sequence of nullable Double values that is obtained by invoking a projection function on each element of the input sequence. -
sumInteger
public static <T> int sumInteger(Queryable<T> source, FunctionExpression<IntegerFunction1<T>> selector) Computes the sum of the sequence of int values that is obtained by invoking a projection function on each element of the input sequence. -
sumNullableInteger
public static <T> Integer sumNullableInteger(Queryable<T> source, FunctionExpression<NullableIntegerFunction1<T>> selector) Computes the sum of the sequence of nullable int values that is obtained by invoking a projection function on each element of the input sequence. -
sumLong
Computes the sum of the sequence of long values that is obtained by invoking a projection function on each element of the input sequence. -
sumNullableLong
public static <T> Long sumNullableLong(Queryable<T> source, FunctionExpression<NullableLongFunction1<T>> selector) Computes the sum of the sequence of nullable long values that is obtained by invoking a projection function on each element of the input sequence. -
sumFloat
public static <T> float sumFloat(Queryable<T> source, FunctionExpression<FloatFunction1<T>> selector) Computes the sum of the sequence of Float values that is obtained by invoking a projection function on each element of the input sequence. -
sumNullableFloat
public static <T> Float sumNullableFloat(Queryable<T> source, FunctionExpression<NullableFloatFunction1<T>> selector) Computes the sum of the sequence of nullable Float values that is obtained by invoking a projection function on each element of the input sequence. -
take
Returns a specified number of contiguous elements from the start of a sequence. -
takeWhile
public static <T> Queryable<T> takeWhile(Queryable<T> source, FunctionExpression<Predicate1<T>> predicate) Returns elements from a sequence as long as a specified condition is true. -
takeWhileN
public static <T> Queryable<T> takeWhileN(Queryable<T> source, FunctionExpression<Predicate2<T, Integer>> predicate) Returns elements from a sequence as long as a specified condition is true. The element's index is used in the logic of the predicate function. -
thenBy
public static <T,TKey extends Comparable<TKey>> OrderedQueryable<T> thenBy(OrderedQueryable<T> source, FunctionExpression<Function1<T, TKey>> keySelector) Performs a subsequent ordering of the elements in a sequence in ascending order according to a key. -
thenBy
public static <T,TKey> OrderedQueryable<T> thenBy(OrderedQueryable<T> source, FunctionExpression<Function1<T, TKey>> keySelector, Comparator<TKey> comparator) Performs a subsequent ordering of the elements in a sequence in ascending order according to a key, using a specified comparator. -
thenByDescending
public static <T,TKey extends Comparable<TKey>> OrderedQueryable<T> thenByDescending(OrderedQueryable<T> source, FunctionExpression<Function1<T, TKey>> keySelector) Performs a subsequent ordering of the elements in a sequence in descending order according to a key. -
thenByDescending
public static <T,TKey> OrderedQueryable<T> thenByDescending(OrderedQueryable<T> source, FunctionExpression<Function1<T, TKey>> keySelector, Comparator<TKey> comparator) Performs a subsequent ordering of the elements in a sequence in dscending order according to a key, using a specified comparator. -
union
Produces the set union of two sequences by using the default equality comparer. -
union
public static <T> Queryable<T> union(Queryable<T> source0, Enumerable<T> source1, EqualityComparer<T> comparer) Produces the set union of two sequences by using a specifiedEqualityComparer<T>
. -
where
public static <T> Queryable<T> where(Queryable<T> source, FunctionExpression<Predicate1<T>> predicate) Filters a sequence of values based on a predicate. -
whereN
public static <T> Queryable<T> whereN(Queryable<T> source, FunctionExpression<Predicate2<T, Integer>> predicate) Filters a sequence of values based on a predicate. Each element's index is used in the logic of the predicate function. -
zip
public static <T0,T1, Queryable<TResult> zipTResult> (Queryable<T0> source0, Enumerable<T1> source1, FunctionExpression<Function2<T0, T1, TResult>> resultSelector) Merges two sequences by using the specified predicate function.
-