Package org.apache.calcite.prepare
Class QueryableRelBuilder<T>
- java.lang.Object
-
- org.apache.calcite.prepare.QueryableRelBuilder<T>
-
- Type Parameters:
T
- Element type
- All Implemented Interfaces:
QueryableFactory<T>
class QueryableRelBuilder<T> extends java.lang.Object implements QueryableFactory<T>
Implementation ofQueryableFactory
that builds a tree ofRelNode
planner nodes. Used byLixToRelTranslator
.Each of the methods that implements a
Replayer
method creates a tree ofRelNode
s equivalent to the arguments, and callssetRel(org.apache.calcite.rel.RelNode)
to assign the root of that tree to therel
member variable.To comply with the
QueryableFactory
interface, which is after all a factory, each method returns a dummy result such asnull
or0
. The caller will not use the result. The real effect of the method is to callsetRel(org.apache.calcite.rel.RelNode)
with aRelNode
.NOTE: Many methods currently throw
UnsupportedOperationException
. These method need to be implemented.
-
-
Field Summary
Fields Modifier and Type Field Description private RelNode
rel
private LixToRelTranslator
translator
-
Constructor Summary
Constructors Constructor Description QueryableRelBuilder(LixToRelTranslator translator)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description T
aggregate(Queryable<T> source, FunctionExpression<Function2<T,T,T>> selector)
Applies an accumulator function over a sequence.<TAccumulate>
TAccumulateaggregate(Queryable<T> source, TAccumulate seed, FunctionExpression<Function2<TAccumulate,T,TAccumulate>> selector)
Applies an accumulator function over a sequence.<TAccumulate,TResult>
TResultaggregate(Queryable<T> source, TAccumulate seed, FunctionExpression<Function2<TAccumulate,T,TAccumulate>> func, FunctionExpression<Function1<TAccumulate,TResult>> selector)
Applies an accumulator function over a sequence.boolean
all(Queryable<T> source, FunctionExpression<Predicate1<T>> predicate)
Determines whether all the elements of a sequence satisfy a condition.boolean
any(Queryable<T> source)
Determines whether a sequence contains any elements.boolean
any(Queryable<T> source, FunctionExpression<Predicate1<T>> predicate)
Determines whether any element of a sequence satisfies a condition.java.math.BigDecimal
averageBigDecimal(Queryable<T> source, 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.double
averageDouble(Queryable<T> source, 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.float
averageFloat(Queryable<T> source, 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.int
averageInteger(Queryable<T> source, 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.long
averageLong(Queryable<T> source, 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.java.math.BigDecimal
averageNullableBigDecimal(Queryable<T> source, 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.java.lang.Double
averageNullableDouble(Queryable<T> source, 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.java.lang.Float
averageNullableFloat(Queryable<T> source, 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.java.lang.Integer
averageNullableInteger(Queryable<T> source, 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.java.lang.Long
averageNullableLong(Queryable<T> source, 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.<T2> Queryable<T2>
cast(Queryable<T> source, java.lang.Class<T2> clazz)
Queryable<T>
concat(Queryable<T> source, Enumerable<T> source2)
Concatenates two sequences.boolean
contains(Queryable<T> source, T element)
Determines whether a sequence contains a specified element by using the default equality comparer.boolean
contains(Queryable<T> source, T element, EqualityComparer<T> comparer)
Determines whether a sequence contains a specified element by using a specifiedEqualityComparer<T>
.int
count(Queryable<T> source)
Returns the number of elements in a sequence.int
count(Queryable<T> source, FunctionExpression<Predicate1<T>> predicate)
Returns the number of elements in the specified sequence that satisfies a condition.Queryable<T>
defaultIfEmpty(Queryable<T> source)
Returns the elements of the specified sequence or the type parameter's default value in a singleton collection if the sequence is empty.Queryable<T>
defaultIfEmpty(Queryable<T> source, T value)
Returns the elements of the specified sequence or the specified value in a singleton collection if the sequence is empty.Queryable<T>
distinct(Queryable<T> source)
Returns distinct elements from a sequence by using the default equality comparer to compare values.Queryable<T>
distinct(Queryable<T> source, EqualityComparer<T> comparer)
Returns distinct elements from a sequence by using a specifiedEqualityComparer<T>
to compare values.T
elementAt(Queryable<T> source, int index)
Returns the element at a specified index in a sequence.T
elementAtOrDefault(Queryable<T> source, int index)
Returns the element at a specified index in a sequence or a default value if the index is out of range.Queryable<T>
except(Queryable<T> source, Enumerable<T> enumerable)
Produces the set difference of two sequences by using the default equality comparer to compare values.Queryable<T>
except(Queryable<T> source, Enumerable<T> enumerable, EqualityComparer<T> tEqualityComparer)
Produces the set difference of two sequences by using the specifiedEqualityComparer<T>
to compare values.T
first(Queryable<T> source)
Returns the first element of a sequence.T
first(Queryable<T> source, FunctionExpression<Predicate1<T>> predicate)
Returns the first element of a sequence that satisfies a specified condition.T
firstOrDefault(Queryable<T> source)
Returns the first element of a sequence, or a default value if the sequence contains no elements.T
firstOrDefault(Queryable<T> source, 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.<TKey> Queryable<Grouping<TKey,T>>
groupBy(Queryable<T> source, FunctionExpression<Function1<T,TKey>> keySelector)
Groups the elements of a sequence according to a specified key selector function.<TKey> Queryable<Grouping<TKey,T>>
groupBy(Queryable<T> source, FunctionExpression<Function1<T,TKey>> keySelector, EqualityComparer<TKey> comparer)
Groups the elements of a sequence according to a specified key selector function and compares the keys by using a specified comparer.<TKey,TElement>
Queryable<Grouping<TKey,TElement>>groupBy(Queryable<T> source, 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.<TKey,TElement>
Queryable<Grouping<TKey,TElement>>groupBy(Queryable<T> source, FunctionExpression<Function1<T,TKey>> keySelector, FunctionExpression<Function1<T,TElement>> elementSelector, EqualityComparer<TKey> comparer)
Groups the elements of a sequence and projects the elements for each group by using a specified function.<TKey,TElement,TResult>
Queryable<TResult>groupBy(Queryable<T> source, 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.<TKey,TElement,TResult>
Queryable<TResult>groupBy(Queryable<T> source, 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.<TKey,TResult>
Queryable<TResult>groupByK(Queryable<T> source, FunctionExpression<Function1<T,TKey>> keySelector, FunctionExpression<Function2<TKey,Enumerable<T>,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.<TKey,TResult>
Queryable<TResult>groupByK(Queryable<T> source, FunctionExpression<Function1<T,TKey>> keySelector, FunctionExpression<Function2<TKey,Enumerable<T>,TResult>> elementSelector, 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.<TInner,TKey,TResult>
Queryable<TResult>groupJoin(Queryable<T> source, Enumerable<TInner> inner, FunctionExpression<Function1<T,TKey>> outerKeySelector, FunctionExpression<Function1<TInner,TKey>> innerKeySelector, FunctionExpression<Function2<T,Enumerable<TInner>,TResult>> resultSelector)
Correlates the elements of two sequences based on key equality and groups the results.<TInner,TKey,TResult>
Queryable<TResult>groupJoin(Queryable<T> source, Enumerable<TInner> inner, FunctionExpression<Function1<T,TKey>> outerKeySelector, FunctionExpression<Function1<TInner,TKey>> innerKeySelector, FunctionExpression<Function2<T,Enumerable<TInner>,TResult>> resultSelector, EqualityComparer<TKey> comparer)
Correlates the elements of two sequences based on key equality and groups the results.Queryable<T>
intersect(Queryable<T> source, Enumerable<T> enumerable)
Produces the set intersection of two sequences by using the default equality comparer to compare values.Queryable<T>
intersect(Queryable<T> source, Enumerable<T> enumerable, EqualityComparer<T> tEqualityComparer)
Produces the set intersection of two sequences by using the specified EqualityComparer to compare values.<TInner,TKey,TResult>
Queryable<TResult>join(Queryable<T> source, Enumerable<TInner> inner, FunctionExpression<Function1<T,TKey>> outerKeySelector, FunctionExpression<Function1<TInner,TKey>> innerKeySelector, FunctionExpression<Function2<T,TInner,TResult>> resultSelector)
Correlates the elements of two sequences based on matching keys.<TInner,TKey,TResult>
Queryable<TResult>join(Queryable<T> source, Enumerable<TInner> inner, FunctionExpression<Function1<T,TKey>> outerKeySelector, FunctionExpression<Function1<TInner,TKey>> innerKeySelector, FunctionExpression<Function2<T,TInner,TResult>> resultSelector, EqualityComparer<TKey> comparer)
Correlates the elements of two sequences based on matching keys.T
last(Queryable<T> source)
Returns the last element in a sequence.T
last(Queryable<T> source, FunctionExpression<Predicate1<T>> predicate)
Returns the last element of a sequence that satisfies a specified condition.T
lastOrDefault(Queryable<T> source)
Returns the last element in a sequence, or a default value if the sequence contains no elements.T
lastOrDefault(Queryable<T> source, 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.long
longCount(Queryable<T> source)
Returns an long that represents the total number of elements in a sequence.long
longCount(Queryable<T> source, FunctionExpression<Predicate1<T>> predicate)
Returns an long that represents the number of elements in a sequence that satisfy a condition.T
max(Queryable<T> source)
Returns the maximum value in a genericIQueryable<T>
.<TResult extends java.lang.Comparable<TResult>>
TResultmax(Queryable<T> source, FunctionExpression<Function1<T,TResult>> selector)
Invokes a projection function on each element of a genericIQueryable<T>
and returns the maximum resulting value.T
min(Queryable<T> source)
Returns the minimum value in a genericIQueryable<T>
.<TResult extends java.lang.Comparable<TResult>>
TResultmin(Queryable<T> source, FunctionExpression<Function1<T,TResult>> selector)
Invokes a projection function on each element of a genericIQueryable<T>
and returns the minimum resulting value.<TResult> Queryable<TResult>
ofType(Queryable<T> source, java.lang.Class<TResult> clazz)
Filters the elements of an IQueryable based on a specified type.<TKey extends java.lang.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.<TKey> OrderedQueryable<T>
orderBy(Queryable<T> source, FunctionExpression<Function1<T,TKey>> keySelector, java.util.Comparator<TKey> comparator)
Sorts the elements of a sequence in ascending order by using a specified comparer.<TKey extends java.lang.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.<TKey> OrderedQueryable<T>
orderByDescending(Queryable<T> source, FunctionExpression<Function1<T,TKey>> keySelector, java.util.Comparator<TKey> comparator)
Sorts the elements of a sequence in descending order by using a specified comparer.Queryable<T>
reverse(Queryable<T> source)
Inverts the order of the elements in a sequence.<TResult> Queryable<TResult>
select(Queryable<T> source, FunctionExpression<Function1<T,TResult>> selector)
Projects each element of a sequence into a new form.<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.<TCollection,TResult>
Queryable<TResult>selectMany(Queryable<T> source, FunctionExpression<Function2<T,java.lang.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.<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.<TResult> Queryable<TResult>
selectManyN(Queryable<T> source, FunctionExpression<Function2<T,java.lang.Integer,Enumerable<TResult>>> selector)
Projects each element of a sequence to anEnumerable<T>
and combines the resulting sequences into one sequence.<TResult> Queryable<TResult>
selectN(Queryable<T> source, FunctionExpression<Function2<T,java.lang.Integer,TResult>> selector)
Projects each element of a sequence into a new form by incorporating the element's index.boolean
sequenceEqual(Queryable<T> source, Enumerable<T> enumerable)
Determines whether two sequences are equal by using the default equality comparer to compare elements.boolean
sequenceEqual(Queryable<T> source, Enumerable<T> enumerable, EqualityComparer<T> tEqualityComparer)
Determines whether two sequences are equal by using a specified EqualityComparer to compare elements.private void
setRel(RelNode rel)
Sets the output of this event.T
single(Queryable<T> source)
Returns the only element of a sequence, and throws an exception if there is not exactly one element in the sequence.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.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.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.Queryable<T>
skip(Queryable<T> source, int count)
Bypasses a specified number of elements in a sequence and then returns the remaining elements.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.Queryable<T>
skipWhileN(Queryable<T> source, FunctionExpression<Predicate2<T,java.lang.Integer>> predicate)
Bypasses elements in a sequence as long as a specified condition is true and then returns the remaining elements.java.math.BigDecimal
sumBigDecimal(Queryable<T> source, 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.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.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.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.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.java.math.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.java.lang.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.java.lang.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.java.lang.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.java.lang.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.Queryable<T>
take(Queryable<T> source, int count)
Returns a specified number of contiguous elements from the start of a sequence.Queryable<T>
takeWhile(Queryable<T> source, FunctionExpression<Predicate1<T>> predicate)
Returns elements from a sequence as long as a specified condition is true.Queryable<T>
takeWhileN(Queryable<T> source, FunctionExpression<Predicate2<T,java.lang.Integer>> predicate)
Returns elements from a sequence as long as a specified condition is true.<TKey extends java.lang.Comparable<TKey>>
OrderedQueryable<T>thenBy(OrderedQueryable<T> source, FunctionExpression<Function1<T,TKey>> keySelector)
<TKey> OrderedQueryable<T>
thenBy(OrderedQueryable<T> source, FunctionExpression<Function1<T,TKey>> keySelector, java.util.Comparator<TKey> comparator)
<TKey extends java.lang.Comparable<TKey>>
OrderedQueryable<T>thenByDescending(OrderedQueryable<T> source, FunctionExpression<Function1<T,TKey>> keySelector)
<TKey> OrderedQueryable<T>
thenByDescending(OrderedQueryable<T> source, FunctionExpression<Function1<T,TKey>> keySelector, java.util.Comparator<TKey> comparator)
(package private) RelNode
toRel(Queryable<T> queryable)
Queryable<T>
union(Queryable<T> source, Enumerable<T> source1)
Produces the set union of two sequences by using the default equality comparer.Queryable<T>
union(Queryable<T> source, Enumerable<T> source1, EqualityComparer<T> tEqualityComparer)
Produces the set union of two sequences by using a specifiedEqualityComparer<T>
.Queryable<T>
where(Queryable<T> source, FunctionExpression<? extends Predicate1<T>> predicate)
Filters a sequence of values based on a predicate.Queryable<T>
whereN(Queryable<T> source, FunctionExpression<? extends Predicate2<T,java.lang.Integer>> predicate)
Filters a sequence of values based on a predicate.<T1,TResult>
Queryable<TResult>zip(Queryable<T> source, Enumerable<T1> source1, FunctionExpression<Function2<T,T1,TResult>> resultSelector)
Merges two sequences by using the specified predicate function.
-
-
-
Field Detail
-
translator
private final LixToRelTranslator translator
-
rel
private RelNode rel
-
-
Constructor Detail
-
QueryableRelBuilder
QueryableRelBuilder(LixToRelTranslator translator)
-
-
Method Detail
-
setRel
private void setRel(RelNode rel)
Sets the output of this event.
-
aggregate
public <TAccumulate,TResult> TResult aggregate(Queryable<T> source, TAccumulate seed, FunctionExpression<Function2<TAccumulate,T,TAccumulate>> func, FunctionExpression<Function1<TAccumulate,TResult>> selector)
Description copied from interface:QueryableFactory
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.- Specified by:
aggregate
in interfaceQueryableFactory<T>
-
aggregate
public T aggregate(Queryable<T> source, FunctionExpression<Function2<T,T,T>> selector)
Description copied from interface:QueryableFactory
Applies an accumulator function over a sequence.- Specified by:
aggregate
in interfaceQueryableFactory<T>
-
aggregate
public <TAccumulate> TAccumulate aggregate(Queryable<T> source, TAccumulate seed, FunctionExpression<Function2<TAccumulate,T,TAccumulate>> selector)
Description copied from interface:QueryableFactory
Applies an accumulator function over a sequence. The specified seed value is used as the initial accumulator value.- Specified by:
aggregate
in interfaceQueryableFactory<T>
-
all
public boolean all(Queryable<T> source, FunctionExpression<Predicate1<T>> predicate)
Description copied from interface:QueryableFactory
Determines whether all the elements of a sequence satisfy a condition.- Specified by:
all
in interfaceQueryableFactory<T>
-
any
public boolean any(Queryable<T> source)
Description copied from interface:QueryableFactory
Determines whether a sequence contains any elements.- Specified by:
any
in interfaceQueryableFactory<T>
-
any
public boolean any(Queryable<T> source, FunctionExpression<Predicate1<T>> predicate)
Description copied from interface:QueryableFactory
Determines whether any element of a sequence satisfies a condition.- Specified by:
any
in interfaceQueryableFactory<T>
-
averageBigDecimal
public java.math.BigDecimal averageBigDecimal(Queryable<T> source, FunctionExpression<BigDecimalFunction1<T>> selector)
Description copied from interface:QueryableFactory
Computes the average of a sequence of Decimal values that is obtained by invoking a projection function on each element of the input sequence.- Specified by:
averageBigDecimal
in interfaceQueryableFactory<T>
-
averageNullableBigDecimal
public java.math.BigDecimal averageNullableBigDecimal(Queryable<T> source, FunctionExpression<NullableBigDecimalFunction1<T>> selector)
Description copied from interface:QueryableFactory
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.- Specified by:
averageNullableBigDecimal
in interfaceQueryableFactory<T>
-
averageDouble
public double averageDouble(Queryable<T> source, FunctionExpression<DoubleFunction1<T>> selector)
Description copied from interface:QueryableFactory
Computes the average of a sequence of Double values that is obtained by invoking a projection function on each element of the input sequence.- Specified by:
averageDouble
in interfaceQueryableFactory<T>
-
averageNullableDouble
public java.lang.Double averageNullableDouble(Queryable<T> source, FunctionExpression<NullableDoubleFunction1<T>> selector)
Description copied from interface:QueryableFactory
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.- Specified by:
averageNullableDouble
in interfaceQueryableFactory<T>
-
averageInteger
public int averageInteger(Queryable<T> source, FunctionExpression<IntegerFunction1<T>> selector)
Description copied from interface:QueryableFactory
Computes the average of a sequence of int values that is obtained by invoking a projection function on each element of the input sequence.- Specified by:
averageInteger
in interfaceQueryableFactory<T>
-
averageNullableInteger
public java.lang.Integer averageNullableInteger(Queryable<T> source, FunctionExpression<NullableIntegerFunction1<T>> selector)
Description copied from interface:QueryableFactory
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.- Specified by:
averageNullableInteger
in interfaceQueryableFactory<T>
-
averageFloat
public float averageFloat(Queryable<T> source, FunctionExpression<FloatFunction1<T>> selector)
Description copied from interface:QueryableFactory
Computes the average of a sequence of Float values that is obtained by invoking a projection function on each element of the input sequence.- Specified by:
averageFloat
in interfaceQueryableFactory<T>
-
averageNullableFloat
public java.lang.Float averageNullableFloat(Queryable<T> source, FunctionExpression<NullableFloatFunction1<T>> selector)
Description copied from interface:QueryableFactory
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.- Specified by:
averageNullableFloat
in interfaceQueryableFactory<T>
-
averageLong
public long averageLong(Queryable<T> source, FunctionExpression<LongFunction1<T>> selector)
Description copied from interface:QueryableFactory
Computes the average of a sequence of long values that is obtained by invoking a projection function on each element of the input sequence.- Specified by:
averageLong
in interfaceQueryableFactory<T>
-
averageNullableLong
public java.lang.Long averageNullableLong(Queryable<T> source, FunctionExpression<NullableLongFunction1<T>> selector)
Description copied from interface:QueryableFactory
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.- Specified by:
averageNullableLong
in interfaceQueryableFactory<T>
-
concat
public Queryable<T> concat(Queryable<T> source, Enumerable<T> source2)
Description copied from interface:QueryableFactory
Concatenates two sequences.- Specified by:
concat
in interfaceQueryableFactory<T>
-
contains
public boolean contains(Queryable<T> source, T element)
Description copied from interface:QueryableFactory
Determines whether a sequence contains a specified element by using the default equality comparer.- Specified by:
contains
in interfaceQueryableFactory<T>
-
contains
public boolean contains(Queryable<T> source, T element, EqualityComparer<T> comparer)
Description copied from interface:QueryableFactory
Determines whether a sequence contains a specified element by using a specifiedEqualityComparer<T>
.- Specified by:
contains
in interfaceQueryableFactory<T>
-
count
public int count(Queryable<T> source)
Description copied from interface:QueryableFactory
Returns the number of elements in a sequence.- Specified by:
count
in interfaceQueryableFactory<T>
-
count
public int count(Queryable<T> source, FunctionExpression<Predicate1<T>> predicate)
Description copied from interface:QueryableFactory
Returns the number of elements in the specified sequence that satisfies a condition.- Specified by:
count
in interfaceQueryableFactory<T>
-
defaultIfEmpty
public Queryable<T> defaultIfEmpty(Queryable<T> source)
Description copied from interface:QueryableFactory
Returns the elements of the specified sequence or the type parameter's default value in a singleton collection if the sequence is empty.- Specified by:
defaultIfEmpty
in interfaceQueryableFactory<T>
-
defaultIfEmpty
public Queryable<T> defaultIfEmpty(Queryable<T> source, T value)
Description copied from interface:QueryableFactory
Returns the elements of the specified sequence or the specified value in a singleton collection if the sequence is empty.- Specified by:
defaultIfEmpty
in interfaceQueryableFactory<T>
-
distinct
public Queryable<T> distinct(Queryable<T> source)
Description copied from interface:QueryableFactory
Returns distinct elements from a sequence by using the default equality comparer to compare values.- Specified by:
distinct
in interfaceQueryableFactory<T>
-
distinct
public Queryable<T> distinct(Queryable<T> source, EqualityComparer<T> comparer)
Description copied from interface:QueryableFactory
Returns distinct elements from a sequence by using a specifiedEqualityComparer<T>
to compare values.- Specified by:
distinct
in interfaceQueryableFactory<T>
-
elementAt
public T elementAt(Queryable<T> source, int index)
Description copied from interface:QueryableFactory
Returns the element at a specified index in a sequence.- Specified by:
elementAt
in interfaceQueryableFactory<T>
-
elementAtOrDefault
public T elementAtOrDefault(Queryable<T> source, int index)
Description copied from interface:QueryableFactory
Returns the element at a specified index in a sequence or a default value if the index is out of range.- Specified by:
elementAtOrDefault
in interfaceQueryableFactory<T>
-
except
public Queryable<T> except(Queryable<T> source, Enumerable<T> enumerable)
Description copied from interface:QueryableFactory
Produces the set difference of two sequences by using the default equality comparer to compare values. (Defined by Queryable.)- Specified by:
except
in interfaceQueryableFactory<T>
-
except
public Queryable<T> except(Queryable<T> source, Enumerable<T> enumerable, EqualityComparer<T> tEqualityComparer)
Description copied from interface:QueryableFactory
Produces the set difference of two sequences by using the specifiedEqualityComparer<T>
to compare values.- Specified by:
except
in interfaceQueryableFactory<T>
-
first
public T first(Queryable<T> source)
Description copied from interface:QueryableFactory
Returns the first element of a sequence. (Defined by Queryable.)- Specified by:
first
in interfaceQueryableFactory<T>
-
first
public T first(Queryable<T> source, FunctionExpression<Predicate1<T>> predicate)
Description copied from interface:QueryableFactory
Returns the first element of a sequence that satisfies a specified condition.- Specified by:
first
in interfaceQueryableFactory<T>
-
firstOrDefault
public T firstOrDefault(Queryable<T> source)
Description copied from interface:QueryableFactory
Returns the first element of a sequence, or a default value if the sequence contains no elements.- Specified by:
firstOrDefault
in interfaceQueryableFactory<T>
-
firstOrDefault
public T firstOrDefault(Queryable<T> source, FunctionExpression<Predicate1<T>> predicate)
Description copied from interface:QueryableFactory
Returns the first element of a sequence that satisfies a specified condition or a default value if no such element is found.- Specified by:
firstOrDefault
in interfaceQueryableFactory<T>
-
groupBy
public <TKey> Queryable<Grouping<TKey,T>> groupBy(Queryable<T> source, FunctionExpression<Function1<T,TKey>> keySelector)
Description copied from interface:QueryableFactory
Groups the elements of a sequence according to a specified key selector function.- Specified by:
groupBy
in interfaceQueryableFactory<T>
-
groupBy
public <TKey> Queryable<Grouping<TKey,T>> groupBy(Queryable<T> source, FunctionExpression<Function1<T,TKey>> keySelector, EqualityComparer<TKey> comparer)
Description copied from interface:QueryableFactory
Groups the elements of a sequence according to a specified key selector function and compares the keys by using a specified comparer.- Specified by:
groupBy
in interfaceQueryableFactory<T>
-
groupBy
public <TKey,TElement> Queryable<Grouping<TKey,TElement>> groupBy(Queryable<T> source, FunctionExpression<Function1<T,TKey>> keySelector, FunctionExpression<Function1<T,TElement>> elementSelector)
Description copied from interface:QueryableFactory
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.- Specified by:
groupBy
in interfaceQueryableFactory<T>
-
groupByK
public <TKey,TResult> Queryable<TResult> groupByK(Queryable<T> source, FunctionExpression<Function1<T,TKey>> keySelector, FunctionExpression<Function2<TKey,Enumerable<T>,TResult>> resultSelector)
Description copied from interface:QueryableFactory
Groups the elements of a sequence according to a specified key selector function and creates a result value from each group and its key.- Specified by:
groupByK
in interfaceQueryableFactory<T>
-
groupBy
public <TKey,TElement> Queryable<Grouping<TKey,TElement>> groupBy(Queryable<T> source, FunctionExpression<Function1<T,TKey>> keySelector, FunctionExpression<Function1<T,TElement>> elementSelector, EqualityComparer<TKey> comparer)
Description copied from interface:QueryableFactory
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.- Specified by:
groupBy
in interfaceQueryableFactory<T>
-
groupByK
public <TKey,TResult> Queryable<TResult> groupByK(Queryable<T> source, FunctionExpression<Function1<T,TKey>> keySelector, FunctionExpression<Function2<TKey,Enumerable<T>,TResult>> elementSelector, EqualityComparer<TKey> comparer)
Description copied from interface:QueryableFactory
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.- Specified by:
groupByK
in interfaceQueryableFactory<T>
-
groupBy
public <TKey,TElement,TResult> Queryable<TResult> groupBy(Queryable<T> source, FunctionExpression<Function1<T,TKey>> keySelector, FunctionExpression<Function1<T,TElement>> elementSelector, FunctionExpression<Function2<TKey,Enumerable<TElement>,TResult>> resultSelector)
Description copied from interface:QueryableFactory
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.- Specified by:
groupBy
in interfaceQueryableFactory<T>
-
groupBy
public <TKey,TElement,TResult> Queryable<TResult> groupBy(Queryable<T> source, FunctionExpression<Function1<T,TKey>> keySelector, FunctionExpression<Function1<T,TElement>> elementSelector, FunctionExpression<Function2<TKey,Enumerable<TElement>,TResult>> resultSelector, EqualityComparer<TKey> comparer)
Description copied from interface:QueryableFactory
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.- Specified by:
groupBy
in interfaceQueryableFactory<T>
-
groupJoin
public <TInner,TKey,TResult> Queryable<TResult> groupJoin(Queryable<T> source, Enumerable<TInner> inner, FunctionExpression<Function1<T,TKey>> outerKeySelector, FunctionExpression<Function1<TInner,TKey>> innerKeySelector, FunctionExpression<Function2<T,Enumerable<TInner>,TResult>> resultSelector)
Description copied from interface:QueryableFactory
Correlates the elements of two sequences based on key equality and groups the results. The default equality comparer is used to compare keys.- Specified by:
groupJoin
in interfaceQueryableFactory<T>
-
groupJoin
public <TInner,TKey,TResult> Queryable<TResult> groupJoin(Queryable<T> source, Enumerable<TInner> inner, FunctionExpression<Function1<T,TKey>> outerKeySelector, FunctionExpression<Function1<TInner,TKey>> innerKeySelector, FunctionExpression<Function2<T,Enumerable<TInner>,TResult>> resultSelector, EqualityComparer<TKey> comparer)
Description copied from interface:QueryableFactory
Correlates the elements of two sequences based on key equality and groups the results. A specified EqualityComparer is used to compare keys.- Specified by:
groupJoin
in interfaceQueryableFactory<T>
-
intersect
public Queryable<T> intersect(Queryable<T> source, Enumerable<T> enumerable)
Description copied from interface:QueryableFactory
Produces the set intersection of two sequences by using the default equality comparer to compare values. (Defined by Queryable.)- Specified by:
intersect
in interfaceQueryableFactory<T>
-
intersect
public Queryable<T> intersect(Queryable<T> source, Enumerable<T> enumerable, EqualityComparer<T> tEqualityComparer)
Description copied from interface:QueryableFactory
Produces the set intersection of two sequences by using the specified EqualityComparer to compare values.- Specified by:
intersect
in interfaceQueryableFactory<T>
-
join
public <TInner,TKey,TResult> Queryable<TResult> join(Queryable<T> source, Enumerable<TInner> inner, FunctionExpression<Function1<T,TKey>> outerKeySelector, FunctionExpression<Function1<TInner,TKey>> innerKeySelector, FunctionExpression<Function2<T,TInner,TResult>> resultSelector)
Description copied from interface:QueryableFactory
Correlates the elements of two sequences based on matching keys. The default equality comparer is used to compare keys.- Specified by:
join
in interfaceQueryableFactory<T>
-
join
public <TInner,TKey,TResult> Queryable<TResult> join(Queryable<T> source, Enumerable<TInner> inner, FunctionExpression<Function1<T,TKey>> outerKeySelector, FunctionExpression<Function1<TInner,TKey>> innerKeySelector, FunctionExpression<Function2<T,TInner,TResult>> resultSelector, EqualityComparer<TKey> comparer)
Description copied from interface:QueryableFactory
Correlates the elements of two sequences based on matching keys. A specified EqualityComparer is used to compare keys.- Specified by:
join
in interfaceQueryableFactory<T>
-
last
public T last(Queryable<T> source)
Description copied from interface:QueryableFactory
Returns the last element in a sequence. (Defined by Queryable.)- Specified by:
last
in interfaceQueryableFactory<T>
-
last
public T last(Queryable<T> source, FunctionExpression<Predicate1<T>> predicate)
Description copied from interface:QueryableFactory
Returns the last element of a sequence that satisfies a specified condition.- Specified by:
last
in interfaceQueryableFactory<T>
-
lastOrDefault
public T lastOrDefault(Queryable<T> source)
Description copied from interface:QueryableFactory
Returns the last element in a sequence, or a default value if the sequence contains no elements.- Specified by:
lastOrDefault
in interfaceQueryableFactory<T>
-
lastOrDefault
public T lastOrDefault(Queryable<T> source, FunctionExpression<Predicate1<T>> predicate)
Description copied from interface:QueryableFactory
Returns the last element of a sequence that satisfies a condition or a default value if no such element is found.- Specified by:
lastOrDefault
in interfaceQueryableFactory<T>
-
longCount
public long longCount(Queryable<T> source)
Description copied from interface:QueryableFactory
Returns an long that represents the total number of elements in a sequence.- Specified by:
longCount
in interfaceQueryableFactory<T>
-
longCount
public long longCount(Queryable<T> source, FunctionExpression<Predicate1<T>> predicate)
Description copied from interface:QueryableFactory
Returns an long that represents the number of elements in a sequence that satisfy a condition.- Specified by:
longCount
in interfaceQueryableFactory<T>
-
max
public T max(Queryable<T> source)
Description copied from interface:QueryableFactory
Returns the maximum value in a genericIQueryable<T>
.- Specified by:
max
in interfaceQueryableFactory<T>
-
max
public <TResult extends java.lang.Comparable<TResult>> TResult max(Queryable<T> source, FunctionExpression<Function1<T,TResult>> selector)
Description copied from interface:QueryableFactory
Invokes a projection function on each element of a genericIQueryable<T>
and returns the maximum resulting value.- Specified by:
max
in interfaceQueryableFactory<T>
-
min
public T min(Queryable<T> source)
Description copied from interface:QueryableFactory
Returns the minimum value in a genericIQueryable<T>
.- Specified by:
min
in interfaceQueryableFactory<T>
-
min
public <TResult extends java.lang.Comparable<TResult>> TResult min(Queryable<T> source, FunctionExpression<Function1<T,TResult>> selector)
Description copied from interface:QueryableFactory
Invokes a projection function on each element of a genericIQueryable<T>
and returns the minimum resulting value.- Specified by:
min
in interfaceQueryableFactory<T>
-
ofType
public <TResult> Queryable<TResult> ofType(Queryable<T> source, java.lang.Class<TResult> clazz)
Description copied from interface:QueryableFactory
Filters the elements of an IQueryable based on a specified type.- Specified by:
ofType
in interfaceQueryableFactory<T>
-
cast
public <T2> Queryable<T2> cast(Queryable<T> source, java.lang.Class<T2> clazz)
- Specified by:
cast
in interfaceQueryableFactory<T>
-
orderBy
public <TKey extends java.lang.Comparable> OrderedQueryable<T> orderBy(Queryable<T> source, FunctionExpression<Function1<T,TKey>> keySelector)
Description copied from interface:QueryableFactory
Sorts the elements of a sequence in ascending order according to a key.- Specified by:
orderBy
in interfaceQueryableFactory<T>
-
orderBy
public <TKey> OrderedQueryable<T> orderBy(Queryable<T> source, FunctionExpression<Function1<T,TKey>> keySelector, java.util.Comparator<TKey> comparator)
Description copied from interface:QueryableFactory
Sorts the elements of a sequence in ascending order by using a specified comparer.- Specified by:
orderBy
in interfaceQueryableFactory<T>
-
orderByDescending
public <TKey extends java.lang.Comparable> OrderedQueryable<T> orderByDescending(Queryable<T> source, FunctionExpression<Function1<T,TKey>> keySelector)
Description copied from interface:QueryableFactory
Sorts the elements of a sequence in descending order according to a key.- Specified by:
orderByDescending
in interfaceQueryableFactory<T>
-
orderByDescending
public <TKey> OrderedQueryable<T> orderByDescending(Queryable<T> source, FunctionExpression<Function1<T,TKey>> keySelector, java.util.Comparator<TKey> comparator)
Description copied from interface:QueryableFactory
Sorts the elements of a sequence in descending order by using a specified comparer.- Specified by:
orderByDescending
in interfaceQueryableFactory<T>
-
reverse
public Queryable<T> reverse(Queryable<T> source)
Description copied from interface:QueryableFactory
Inverts the order of the elements in a sequence.- Specified by:
reverse
in interfaceQueryableFactory<T>
-
select
public <TResult> Queryable<TResult> select(Queryable<T> source, FunctionExpression<Function1<T,TResult>> selector)
Description copied from interface:QueryableFactory
Projects each element of a sequence into a new form.- Specified by:
select
in interfaceQueryableFactory<T>
-
selectN
public <TResult> Queryable<TResult> selectN(Queryable<T> source, FunctionExpression<Function2<T,java.lang.Integer,TResult>> selector)
Description copied from interface:QueryableFactory
Projects each element of a sequence into a new form by incorporating the element's index.- Specified by:
selectN
in interfaceQueryableFactory<T>
-
selectMany
public <TResult> Queryable<TResult> selectMany(Queryable<T> source, FunctionExpression<Function1<T,Enumerable<TResult>>> selector)
Description copied from interface:QueryableFactory
Projects each element of a sequence to anEnumerable<T>
and combines the resulting sequences into one sequence.- Specified by:
selectMany
in interfaceQueryableFactory<T>
-
selectManyN
public <TResult> Queryable<TResult> selectManyN(Queryable<T> source, FunctionExpression<Function2<T,java.lang.Integer,Enumerable<TResult>>> selector)
Description copied from interface:QueryableFactory
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.- Specified by:
selectManyN
in interfaceQueryableFactory<T>
-
selectMany
public <TCollection,TResult> Queryable<TResult> selectMany(Queryable<T> source, FunctionExpression<Function2<T,java.lang.Integer,Enumerable<TCollection>>> collectionSelector, FunctionExpression<Function2<T,TCollection,TResult>> resultSelector)
Description copied from interface:QueryableFactory
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.- Specified by:
selectMany
in interfaceQueryableFactory<T>
-
selectManyN
public <TCollection,TResult> Queryable<TResult> selectManyN(Queryable<T> source, FunctionExpression<Function1<T,Enumerable<TCollection>>> collectionSelector, FunctionExpression<Function2<T,TCollection,TResult>> resultSelector)
Description copied from interface:QueryableFactory
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.- Specified by:
selectManyN
in interfaceQueryableFactory<T>
-
sequenceEqual
public boolean sequenceEqual(Queryable<T> source, Enumerable<T> enumerable)
Description copied from interface:QueryableFactory
Determines whether two sequences are equal by using the default equality comparer to compare elements.- Specified by:
sequenceEqual
in interfaceQueryableFactory<T>
-
sequenceEqual
public boolean sequenceEqual(Queryable<T> source, Enumerable<T> enumerable, EqualityComparer<T> tEqualityComparer)
Description copied from interface:QueryableFactory
Determines whether two sequences are equal by using a specified EqualityComparer to compare elements.- Specified by:
sequenceEqual
in interfaceQueryableFactory<T>
-
single
public T single(Queryable<T> source)
Description copied from interface:QueryableFactory
Returns the only element of a sequence, and throws an exception if there is not exactly one element in the sequence.- Specified by:
single
in interfaceQueryableFactory<T>
-
single
public T single(Queryable<T> source, FunctionExpression<Predicate1<T>> predicate)
Description copied from interface:QueryableFactory
Returns the only element of a sequence that satisfies a specified condition, and throws an exception if more than one such element exists.- Specified by:
single
in interfaceQueryableFactory<T>
-
singleOrDefault
public T singleOrDefault(Queryable<T> source)
Description copied from interface:QueryableFactory
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.- Specified by:
singleOrDefault
in interfaceQueryableFactory<T>
-
singleOrDefault
public T singleOrDefault(Queryable<T> source, FunctionExpression<Predicate1<T>> predicate)
Description copied from interface:QueryableFactory
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.- Specified by:
singleOrDefault
in interfaceQueryableFactory<T>
-
skip
public Queryable<T> skip(Queryable<T> source, int count)
Description copied from interface:QueryableFactory
Bypasses a specified number of elements in a sequence and then returns the remaining elements.- Specified by:
skip
in interfaceQueryableFactory<T>
-
skipWhile
public Queryable<T> skipWhile(Queryable<T> source, FunctionExpression<Predicate1<T>> predicate)
Description copied from interface:QueryableFactory
Bypasses elements in a sequence as long as a specified condition is true and then returns the remaining elements.- Specified by:
skipWhile
in interfaceQueryableFactory<T>
-
skipWhileN
public Queryable<T> skipWhileN(Queryable<T> source, FunctionExpression<Predicate2<T,java.lang.Integer>> predicate)
Description copied from interface:QueryableFactory
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.- Specified by:
skipWhileN
in interfaceQueryableFactory<T>
-
sumBigDecimal
public java.math.BigDecimal sumBigDecimal(Queryable<T> source, FunctionExpression<BigDecimalFunction1<T>> selector)
Description copied from interface:QueryableFactory
Computes the sum of the sequence of Decimal values that is obtained by invoking a projection function on each element of the input sequence.- Specified by:
sumBigDecimal
in interfaceQueryableFactory<T>
-
sumNullableBigDecimal
public java.math.BigDecimal sumNullableBigDecimal(Queryable<T> source, FunctionExpression<NullableBigDecimalFunction1<T>> selector)
Description copied from interface:QueryableFactory
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.- Specified by:
sumNullableBigDecimal
in interfaceQueryableFactory<T>
-
sumDouble
public double sumDouble(Queryable<T> source, FunctionExpression<DoubleFunction1<T>> selector)
Description copied from interface:QueryableFactory
Computes the sum of the sequence of Double values that is obtained by invoking a projection function on each element of the input sequence.- Specified by:
sumDouble
in interfaceQueryableFactory<T>
-
sumNullableDouble
public java.lang.Double sumNullableDouble(Queryable<T> source, FunctionExpression<NullableDoubleFunction1<T>> selector)
Description copied from interface:QueryableFactory
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.- Specified by:
sumNullableDouble
in interfaceQueryableFactory<T>
-
sumInteger
public int sumInteger(Queryable<T> source, FunctionExpression<IntegerFunction1<T>> selector)
Description copied from interface:QueryableFactory
Computes the sum of the sequence of int values that is obtained by invoking a projection function on each element of the input sequence.- Specified by:
sumInteger
in interfaceQueryableFactory<T>
-
sumNullableInteger
public java.lang.Integer sumNullableInteger(Queryable<T> source, FunctionExpression<NullableIntegerFunction1<T>> selector)
Description copied from interface:QueryableFactory
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.- Specified by:
sumNullableInteger
in interfaceQueryableFactory<T>
-
sumLong
public long sumLong(Queryable<T> source, FunctionExpression<LongFunction1<T>> selector)
Description copied from interface:QueryableFactory
Computes the sum of the sequence of long values that is obtained by invoking a projection function on each element of the input sequence.- Specified by:
sumLong
in interfaceQueryableFactory<T>
-
sumNullableLong
public java.lang.Long sumNullableLong(Queryable<T> source, FunctionExpression<NullableLongFunction1<T>> selector)
Description copied from interface:QueryableFactory
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.- Specified by:
sumNullableLong
in interfaceQueryableFactory<T>
-
sumFloat
public float sumFloat(Queryable<T> source, FunctionExpression<FloatFunction1<T>> selector)
Description copied from interface:QueryableFactory
Computes the sum of the sequence of Float values that is obtained by invoking a projection function on each element of the input sequence.- Specified by:
sumFloat
in interfaceQueryableFactory<T>
-
sumNullableFloat
public java.lang.Float sumNullableFloat(Queryable<T> source, FunctionExpression<NullableFloatFunction1<T>> selector)
Description copied from interface:QueryableFactory
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.- Specified by:
sumNullableFloat
in interfaceQueryableFactory<T>
-
take
public Queryable<T> take(Queryable<T> source, int count)
Description copied from interface:QueryableFactory
Returns a specified number of contiguous elements from the start of a sequence.- Specified by:
take
in interfaceQueryableFactory<T>
-
takeWhile
public Queryable<T> takeWhile(Queryable<T> source, FunctionExpression<Predicate1<T>> predicate)
Description copied from interface:QueryableFactory
Returns elements from a sequence as long as a specified condition is true.- Specified by:
takeWhile
in interfaceQueryableFactory<T>
-
takeWhileN
public Queryable<T> takeWhileN(Queryable<T> source, FunctionExpression<Predicate2<T,java.lang.Integer>> predicate)
Description copied from interface:QueryableFactory
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.- Specified by:
takeWhileN
in interfaceQueryableFactory<T>
-
thenBy
public <TKey extends java.lang.Comparable<TKey>> OrderedQueryable<T> thenBy(OrderedQueryable<T> source, FunctionExpression<Function1<T,TKey>> keySelector)
- Specified by:
thenBy
in interfaceQueryableFactory<T>
-
thenBy
public <TKey> OrderedQueryable<T> thenBy(OrderedQueryable<T> source, FunctionExpression<Function1<T,TKey>> keySelector, java.util.Comparator<TKey> comparator)
- Specified by:
thenBy
in interfaceQueryableFactory<T>
-
thenByDescending
public <TKey extends java.lang.Comparable<TKey>> OrderedQueryable<T> thenByDescending(OrderedQueryable<T> source, FunctionExpression<Function1<T,TKey>> keySelector)
- Specified by:
thenByDescending
in interfaceQueryableFactory<T>
-
thenByDescending
public <TKey> OrderedQueryable<T> thenByDescending(OrderedQueryable<T> source, FunctionExpression<Function1<T,TKey>> keySelector, java.util.Comparator<TKey> comparator)
- Specified by:
thenByDescending
in interfaceQueryableFactory<T>
-
union
public Queryable<T> union(Queryable<T> source, Enumerable<T> source1)
Description copied from interface:QueryableFactory
Produces the set union of two sequences by using the default equality comparer.- Specified by:
union
in interfaceQueryableFactory<T>
-
union
public Queryable<T> union(Queryable<T> source, Enumerable<T> source1, EqualityComparer<T> tEqualityComparer)
Description copied from interface:QueryableFactory
Produces the set union of two sequences by using a specifiedEqualityComparer<T>
.- Specified by:
union
in interfaceQueryableFactory<T>
-
where
public Queryable<T> where(Queryable<T> source, FunctionExpression<? extends Predicate1<T>> predicate)
Description copied from interface:QueryableFactory
Filters a sequence of values based on a predicate.- Specified by:
where
in interfaceQueryableFactory<T>
-
whereN
public Queryable<T> whereN(Queryable<T> source, FunctionExpression<? extends Predicate2<T,java.lang.Integer>> predicate)
Description copied from interface:QueryableFactory
Filters a sequence of values based on a predicate. Each element's index is used in the logic of the predicate function.- Specified by:
whereN
in interfaceQueryableFactory<T>
-
zip
public <T1,TResult> Queryable<TResult> zip(Queryable<T> source, Enumerable<T1> source1, FunctionExpression<Function2<T,T1,TResult>> resultSelector)
Description copied from interface:QueryableFactory
Merges two sequences by using the specified predicate function.- Specified by:
zip
in interfaceQueryableFactory<T>
-
-