Class EnumerableQueryable<T>
- java.lang.Object
-
- org.apache.calcite.linq4j.DefaultEnumerable<T>
-
- org.apache.calcite.linq4j.EnumerableQueryable<T>
-
- Type Parameters:
T
- Element type
- All Implemented Interfaces:
java.lang.Iterable<T>
,Enumerable<T>
,ExtendedEnumerable<T>
,ExtendedOrderedEnumerable<T>
,ExtendedQueryable<T>
,OrderedEnumerable<T>
,Queryable<T>
,RawEnumerable<T>
,RawQueryable<T>
- Direct Known Subclasses:
EnumerableOrderedQueryable
class EnumerableQueryable<T> extends DefaultEnumerable<T> implements Queryable<T>
Implementation ofQueryable
by aEnumerable
.
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.Class<T>
elementType
private Enumerable<T>
enumerable
private Expression
expression
private QueryProvider
provider
-
Constructor Summary
Constructors Constructor Description EnumerableQueryable(QueryProvider provider, java.lang.Class<T> elementType, Expression expression, Enumerable<T> enumerable)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description T
aggregate(Function2<T,T,T> func)
Applies an accumulator function over a sequence.T
aggregate(FunctionExpression<Function2<T,T,T>> selector)
Applies an accumulator function over a sequence.<TAccumulate,TResult>
TResultaggregate(TAccumulate seed, Function2<TAccumulate,T,TAccumulate> func, Function1<TAccumulate,TResult> selector)
Applies an accumulator function over a sequence.<TAccumulate>
TAccumulateaggregate(TAccumulate seed, FunctionExpression<Function2<TAccumulate,T,TAccumulate>> selector)
Applies an accumulator function over a sequence.<TAccumulate,TResult>
TResultaggregate(TAccumulate seed, FunctionExpression<Function2<TAccumulate,T,TAccumulate>> func, FunctionExpression<Function1<TAccumulate,TResult>> selector)
Applies an accumulator function over a sequence.boolean
all(FunctionExpression<Predicate1<T>> predicate)
Determines whether all the elements of a sequence satisfy a condition.boolean
any(FunctionExpression<Predicate1<T>> predicate)
Determines whether any element of a sequence satisfies a condition.java.math.BigDecimal
averageBigDecimal(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(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(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(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(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(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(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(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(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(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(java.lang.Class<T2> clazz)
Converts the elements of this Enumerable to the specified type.Queryable<T>
concat(Enumerable<T> source2)
Concatenates two sequences.int
count(FunctionExpression<Predicate1<T>> predicate)
Returns the number of elements in the specified sequence that satisfies a condition.Queryable<T>
defaultIfEmpty()
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>
distinct()
Returns distinct elements from a sequence by using the default equality comparer to compare values.Queryable<T>
distinct(EqualityComparer<T> comparer)
Returns distinct elements from a sequence by using a specifiedEqualityComparer<TSource>
to compare values.Enumerator<T>
enumerator()
Returns an enumerator that iterates through a collection.Queryable<T>
except(Enumerable<T> enumerable1)
Produces the set difference of two sequences by using the default equality comparer to compare values.Queryable<T>
except(Enumerable<T> enumerable1, EqualityComparer<T> comparer)
Produces the set difference of two sequences by using the specifiedEqualityComparer<TSource>
to compare values.T
first(FunctionExpression<Predicate1<T>> predicate)
Returns the first element of a sequence that satisfies a specified condition.T
firstOrDefault(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.java.lang.reflect.Type
getElementType()
Gets the type of the element(s) that are returned when the expression tree associated with this Queryable is executed.Expression
getExpression()
Gets the expression tree that is associated with this Queryable.QueryProvider
getProvider()
Gets the query provider that is associated with this data source.protected Enumerable<T>
getThis()
Derived classes might wish to override this method to return the "outer" enumerable.<TKey> Queryable<Grouping<TKey,T>>
groupBy(FunctionExpression<Function1<T,TKey>> keySelector)
Groups the elements of a sequence according to a specified key selector function.<TKey> Queryable<Grouping<TKey,T>>
groupBy(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(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(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(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(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(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(FunctionExpression<Function1<T,TKey>> keySelector, FunctionExpression<Function2<TKey,Enumerable<T>,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.<TInner,TKey,TResult>
Queryable<TResult>groupJoin(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(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(Enumerable<T> source1)
Produces the set intersection of two sequences by using the default equality comparer to compare values.Queryable<T>
intersect(Enumerable<T> source1, EqualityComparer<T> comparer)
Produces the set intersection of two sequences by using the specifiedEqualityComparer<TSource>
to compare values.java.util.Iterator<T>
iterator()
<TInner,TKey,TResult>
Queryable<TResult>join(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(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(FunctionExpression<Predicate1<T>> predicate)
Returns the last element of a sequence that satisfies a specified condition.T
lastOrDefault(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(FunctionExpression<Predicate1<T>> predicate)
Returns an long that represents the number of elements in a sequence that satisfy a condition.<TResult extends java.lang.Comparable<TResult>>
TResultmax(FunctionExpression<Function1<T,TResult>> selector)
Invokes a projection function on each element of a genericIQueryable<TSource>
and returns the maximum resulting value.<TResult extends java.lang.Comparable<TResult>>
TResultmin(FunctionExpression<Function1<T,TResult>> selector)
Invokes a projection function on each element of a genericIQueryable<TSource>
and returns the minimum resulting value.<TResult> Queryable<TResult>
ofType(java.lang.Class<TResult> clazz)
Filters the elements of an Enumerable based on a specified type.<TKey extends java.lang.Comparable>
OrderedQueryable<T>orderBy(FunctionExpression<Function1<T,TKey>> keySelector)
Sorts the elements of a sequence in ascending order according to a key.<TKey> OrderedQueryable<T>
orderBy(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(FunctionExpression<Function1<T,TKey>> keySelector)
Sorts the elements of a sequence in descending order according to a key.<TKey> OrderedQueryable<T>
orderByDescending(FunctionExpression<Function1<T,TKey>> keySelector, java.util.Comparator<TKey> comparator)
Sorts the elements of a sequence in descending order by using a specified comparer.protected Queryable<T>
queryable()
Returns the target queryable.Queryable<T>
reverse()
Inverts the order of the elements in a sequence.<TResult> Queryable<TResult>
select(FunctionExpression<Function1<T,TResult>> selector)
Projects each element of a sequence into a new form.<TResult> Queryable<TResult>
selectMany(FunctionExpression<Function1<T,Enumerable<TResult>>> selector)
Projects each element of a sequence to anEnumerable<TSource>
and combines the resulting sequences into one sequence.<TCollection,TResult>
Queryable<TResult>selectMany(FunctionExpression<Function2<T,java.lang.Integer,Enumerable<TCollection>>> collectionSelector, FunctionExpression<Function2<T,TCollection,TResult>> resultSelector)
Projects each element of a sequence to anEnumerable<TSource>
that incorporates the index of the source element that produced it.<TCollection,TResult>
Queryable<TResult>selectManyN(FunctionExpression<Function1<T,Enumerable<TCollection>>> collectionSelector, FunctionExpression<Function2<T,TCollection,TResult>> resultSelector)
Projects each element of a sequence to anEnumerable<TSource>
and invokes a result selector function on each element therein.<TResult> Queryable<TResult>
selectManyN(FunctionExpression<Function2<T,java.lang.Integer,Enumerable<TResult>>> selector)
Projects each element of a sequence to anEnumerable<TSource>
and combines the resulting sequences into one sequence.<TResult> Queryable<TResult>
selectN(FunctionExpression<Function2<T,java.lang.Integer,TResult>> selector)
Projects each element of a sequence into a new form by incorporating the element's index.T
single(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(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(int count)
Bypasses a specified number of elements in a sequence and then returns the remaining elements.Queryable<T>
skipWhile(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(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(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(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(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(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(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(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(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(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(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(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(int count)
Returns a specified number of contiguous elements from the start of a sequence.Queryable<T>
takeWhile(FunctionExpression<Predicate1<T>> predicate)
Returns elements from a sequence as long as a specified condition is true.Queryable<T>
takeWhileN(FunctionExpression<Predicate2<T,java.lang.Integer>> predicate)
Returns elements from a sequence as long as a specified condition is true.Queryable<T>
union(Enumerable<T> source1)
Produces the set union of two sequences by using the default equality comparer.Queryable<T>
union(Enumerable<T> source1, EqualityComparer<T> comparer)
Produces the set union of two sequences by using a specifiedEqualityComparer<TSource>
.Queryable<T>
where(FunctionExpression<? extends Predicate1<T>> predicate)
Filters a sequence of values based on a predicate.Queryable<T>
whereN(FunctionExpression<? extends Predicate2<T,java.lang.Integer>> predicate)
Filters a sequence of values based on a predicate.<T1,TResult>
Queryable<TResult>zip(Enumerable<T1> source1, FunctionExpression<Function2<T,T1,TResult>> resultSelector)
Merges two sequences by using the specified predicate function.-
Methods inherited from class org.apache.calcite.linq4j.DefaultEnumerable
aggregate, all, any, any, asEnumerable, asOrderedQueryable, asQueryable, average, average, average, average, average, average, average, average, average, average, contains, contains, correlateJoin, count, count, createOrderedEnumerable, defaultIfEmpty, elementAt, elementAtOrDefault, first, first, firstOrDefault, firstOrDefault, foreach, getThisOrdered, groupBy, groupBy, groupBy, groupBy, groupBy, groupBy, groupBy, groupBy, groupBy, groupBy, groupJoin, groupJoin, into, join, join, join, last, last, lastOrDefault, lastOrDefault, longCount, longCount, max, max, max, max, max, max, max, max, max, max, max, max, min, min, min, min, min, min, min, min, min, min, min, min, orderBy, orderBy, orderByDescending, orderByDescending, removeAll, select, select, selectMany, selectMany, selectMany, selectMany, sequenceEqual, sequenceEqual, single, single, singleOrDefault, singleOrDefault, skipWhile, skipWhile, sum, sum, sum, sum, sum, sum, sum, sum, sum, sum, takeWhile, takeWhile, thenBy, thenBy, thenByDescending, thenByDescending, toList, toLookup, toLookup, toLookup, toLookup, toMap, toMap, toMap, toMap, where, where, zip
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.calcite.linq4j.Enumerable
asQueryable
-
Methods inherited from interface org.apache.calcite.linq4j.ExtendedEnumerable
aggregate, all, any, any, asEnumerable, average, average, average, average, average, average, average, average, average, average, contains, contains, correlateJoin, count, count, defaultIfEmpty, elementAt, elementAtOrDefault, first, first, firstOrDefault, firstOrDefault, foreach, groupBy, groupBy, groupBy, groupBy, groupBy, groupBy, groupBy, groupBy, groupBy, groupBy, groupJoin, groupJoin, into, join, join, join, last, last, lastOrDefault, lastOrDefault, longCount, longCount, max, max, max, max, max, max, max, max, max, max, max, max, min, min, min, min, min, min, min, min, min, min, min, min, orderBy, orderBy, orderByDescending, orderByDescending, removeAll, select, select, selectMany, selectMany, selectMany, selectMany, sequenceEqual, sequenceEqual, single, single, singleOrDefault, skipWhile, skipWhile, sum, sum, sum, sum, sum, sum, sum, sum, sum, sum, takeWhile, takeWhile, toList, toLookup, toLookup, toLookup, toLookup, toMap, toMap, toMap, toMap, where, where, zip
-
Methods inherited from interface org.apache.calcite.linq4j.ExtendedQueryable
singleOrDefault
-
-
-
-
Field Detail
-
provider
private final QueryProvider provider
-
elementType
private final java.lang.Class<T> elementType
-
enumerable
private final Enumerable<T> enumerable
-
expression
private final Expression expression
-
-
Constructor Detail
-
EnumerableQueryable
EnumerableQueryable(QueryProvider provider, java.lang.Class<T> elementType, Expression expression, Enumerable<T> enumerable)
-
-
Method Detail
-
getThis
protected Enumerable<T> getThis()
Description copied from class:DefaultEnumerable
Derived classes might wish to override this method to return the "outer" enumerable.- Overrides:
getThis
in classDefaultEnumerable<T>
-
queryable
protected Queryable<T> queryable()
Returns the target queryable. Usually this.- Returns:
- Target queryable
-
iterator
public java.util.Iterator<T> iterator()
- Specified by:
iterator
in interfacejava.lang.Iterable<T>
-
enumerator
public Enumerator<T> enumerator()
Description copied from interface:RawEnumerable
Returns an enumerator that iterates through a collection.- Specified by:
enumerator
in interfaceRawEnumerable<T>
-
union
public Queryable<T> union(Enumerable<T> source1)
Description copied from interface:ExtendedEnumerable
Produces the set union of two sequences by using the default equality comparer.- Specified by:
union
in interfaceExtendedEnumerable<T>
- Specified by:
union
in interfaceExtendedQueryable<T>
- Overrides:
union
in classDefaultEnumerable<T>
-
union
public Queryable<T> union(Enumerable<T> source1, EqualityComparer<T> comparer)
Description copied from interface:ExtendedEnumerable
Produces the set union of two sequences by using a specifiedEqualityComparer<TSource>
.- Specified by:
union
in interfaceExtendedEnumerable<T>
- Specified by:
union
in interfaceExtendedQueryable<T>
- Overrides:
union
in classDefaultEnumerable<T>
-
intersect
public Queryable<T> intersect(Enumerable<T> source1)
Description copied from interface:ExtendedEnumerable
Produces the set intersection of two sequences by using the default equality comparer to compare values. (Defined by Enumerable.)- Specified by:
intersect
in interfaceExtendedEnumerable<T>
- Specified by:
intersect
in interfaceExtendedQueryable<T>
- Overrides:
intersect
in classDefaultEnumerable<T>
-
intersect
public Queryable<T> intersect(Enumerable<T> source1, EqualityComparer<T> comparer)
Description copied from interface:ExtendedEnumerable
Produces the set intersection of two sequences by using the specifiedEqualityComparer<TSource>
to compare values.- Specified by:
intersect
in interfaceExtendedEnumerable<T>
- Specified by:
intersect
in interfaceExtendedQueryable<T>
- Overrides:
intersect
in classDefaultEnumerable<T>
-
except
public Queryable<T> except(Enumerable<T> enumerable1, EqualityComparer<T> comparer)
Description copied from interface:ExtendedEnumerable
Produces the set difference of two sequences by using the specifiedEqualityComparer<TSource>
to compare values.- Specified by:
except
in interfaceExtendedEnumerable<T>
- Specified by:
except
in interfaceExtendedQueryable<T>
- Overrides:
except
in classDefaultEnumerable<T>
-
except
public Queryable<T> except(Enumerable<T> enumerable1)
Description copied from interface:ExtendedEnumerable
Produces the set difference of two sequences by using the default equality comparer to compare values. (Defined by Enumerable.)- Specified by:
except
in interfaceExtendedEnumerable<T>
- Specified by:
except
in interfaceExtendedQueryable<T>
- Overrides:
except
in classDefaultEnumerable<T>
-
take
public Queryable<T> take(int count)
Description copied from interface:ExtendedEnumerable
Returns a specified number of contiguous elements from the start of a sequence.- Specified by:
take
in interfaceExtendedEnumerable<T>
- Specified by:
take
in interfaceExtendedQueryable<T>
- Overrides:
take
in classDefaultEnumerable<T>
-
skip
public Queryable<T> skip(int count)
Description copied from interface:ExtendedEnumerable
Bypasses a specified number of elements in a sequence and then returns the remaining elements.- Specified by:
skip
in interfaceExtendedEnumerable<T>
- Specified by:
skip
in interfaceExtendedQueryable<T>
- Overrides:
skip
in classDefaultEnumerable<T>
-
reverse
public Queryable<T> reverse()
Description copied from interface:ExtendedEnumerable
Inverts the order of the elements in a sequence.- Specified by:
reverse
in interfaceExtendedEnumerable<T>
- Specified by:
reverse
in interfaceExtendedQueryable<T>
- Overrides:
reverse
in classDefaultEnumerable<T>
-
distinct
public Queryable<T> distinct()
Description copied from interface:ExtendedEnumerable
Returns distinct elements from a sequence by using the default equality comparer to compare values.- Specified by:
distinct
in interfaceExtendedEnumerable<T>
- Specified by:
distinct
in interfaceExtendedQueryable<T>
- Overrides:
distinct
in classDefaultEnumerable<T>
-
distinct
public Queryable<T> distinct(EqualityComparer<T> comparer)
Description copied from interface:ExtendedEnumerable
Returns distinct elements from a sequence by using a specifiedEqualityComparer<TSource>
to compare values.- Specified by:
distinct
in interfaceExtendedEnumerable<T>
- Specified by:
distinct
in interfaceExtendedQueryable<T>
- Overrides:
distinct
in classDefaultEnumerable<T>
-
ofType
public <TResult> Queryable<TResult> ofType(java.lang.Class<TResult> clazz)
Description copied from interface:ExtendedEnumerable
Filters the elements of an Enumerable based on a specified type.Analogous to LINQ's Enumerable.OfType extension method.
- Specified by:
ofType
in interfaceExtendedEnumerable<T>
- Specified by:
ofType
in interfaceExtendedQueryable<T>
- Overrides:
ofType
in classDefaultEnumerable<T>
- Type Parameters:
TResult
- Target type- Parameters:
clazz
- Target type- Returns:
- Collection of T2
-
defaultIfEmpty
public Queryable<T> defaultIfEmpty()
Description copied from interface:ExtendedEnumerable
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 interfaceExtendedEnumerable<T>
- Specified by:
defaultIfEmpty
in interfaceExtendedQueryable<T>
- Overrides:
defaultIfEmpty
in classDefaultEnumerable<T>
-
cast
public <T2> Queryable<T2> cast(java.lang.Class<T2> clazz)
Description copied from interface:ExtendedEnumerable
Converts the elements of this Enumerable to the specified type.This method is implemented by using deferred execution. The immediate return value is an object that stores all the information that is required to perform the action. The query represented by this method is not executed until the object is enumerated either by calling its
RawEnumerable.enumerator()
method directly or by usingfor (... in ...)
.If an element cannot be cast to type TResult, the
Enumerator.current()
method will throw aClassCastException
a exception when the element it accessed. To obtain only those elements that can be cast to type TResult, use theExtendedEnumerable.ofType(Class)
method instead.- Specified by:
cast
in interfaceExtendedEnumerable<T>
- Specified by:
cast
in interfaceExtendedQueryable<T>
- Overrides:
cast
in classDefaultEnumerable<T>
- See Also:
EnumerableDefaults.cast(org.apache.calcite.linq4j.Enumerable<TSource>, java.lang.Class<T2>)
,ExtendedEnumerable.ofType(Class)
-
getElementType
public java.lang.reflect.Type getElementType()
Description copied from interface:RawQueryable
Gets the type of the element(s) that are returned when the expression tree associated with this Queryable is executed.- Specified by:
getElementType
in interfaceRawQueryable<T>
-
getExpression
public Expression getExpression()
Description copied from interface:RawQueryable
Gets the expression tree that is associated with this Queryable.- Specified by:
getExpression
in interfaceRawQueryable<T>
-
getProvider
public QueryProvider getProvider()
Description copied from interface:RawQueryable
Gets the query provider that is associated with this data source.- Specified by:
getProvider
in interfaceRawQueryable<T>
-
aggregate
public T aggregate(FunctionExpression<Function2<T,T,T>> selector)
Description copied from interface:ExtendedQueryable
Applies an accumulator function over a sequence.- Specified by:
aggregate
in interfaceExtendedQueryable<T>
-
aggregate
public <TAccumulate> TAccumulate aggregate(TAccumulate seed, FunctionExpression<Function2<TAccumulate,T,TAccumulate>> selector)
Description copied from interface:ExtendedQueryable
Applies an accumulator function over a sequence. The specified seed value is used as the initial accumulator value.- Specified by:
aggregate
in interfaceExtendedQueryable<T>
-
aggregate
public <TAccumulate,TResult> TResult aggregate(TAccumulate seed, FunctionExpression<Function2<TAccumulate,T,TAccumulate>> func, FunctionExpression<Function1<TAccumulate,TResult>> selector)
Description copied from interface:ExtendedQueryable
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 interfaceExtendedQueryable<T>
-
all
public boolean all(FunctionExpression<Predicate1<T>> predicate)
Description copied from interface:ExtendedQueryable
Determines whether all the elements of a sequence satisfy a condition.- Specified by:
all
in interfaceExtendedQueryable<T>
-
any
public boolean any(FunctionExpression<Predicate1<T>> predicate)
Description copied from interface:ExtendedQueryable
Determines whether any element of a sequence satisfies a condition.- Specified by:
any
in interfaceExtendedQueryable<T>
-
averageBigDecimal
public java.math.BigDecimal averageBigDecimal(FunctionExpression<BigDecimalFunction1<T>> selector)
Description copied from interface:ExtendedQueryable
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 interfaceExtendedQueryable<T>
-
averageNullableBigDecimal
public java.math.BigDecimal averageNullableBigDecimal(FunctionExpression<NullableBigDecimalFunction1<T>> selector)
Description copied from interface:ExtendedQueryable
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 interfaceExtendedQueryable<T>
-
averageDouble
public double averageDouble(FunctionExpression<DoubleFunction1<T>> selector)
Description copied from interface:ExtendedQueryable
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 interfaceExtendedQueryable<T>
-
averageNullableDouble
public java.lang.Double averageNullableDouble(FunctionExpression<NullableDoubleFunction1<T>> selector)
Description copied from interface:ExtendedQueryable
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 interfaceExtendedQueryable<T>
-
averageInteger
public int averageInteger(FunctionExpression<IntegerFunction1<T>> selector)
Description copied from interface:ExtendedQueryable
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 interfaceExtendedQueryable<T>
-
averageNullableInteger
public java.lang.Integer averageNullableInteger(FunctionExpression<NullableIntegerFunction1<T>> selector)
Description copied from interface:ExtendedQueryable
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 interfaceExtendedQueryable<T>
-
averageFloat
public float averageFloat(FunctionExpression<FloatFunction1<T>> selector)
Description copied from interface:ExtendedQueryable
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 interfaceExtendedQueryable<T>
-
averageNullableFloat
public java.lang.Float averageNullableFloat(FunctionExpression<NullableFloatFunction1<T>> selector)
Description copied from interface:ExtendedQueryable
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 interfaceExtendedQueryable<T>
-
averageLong
public long averageLong(FunctionExpression<LongFunction1<T>> selector)
Description copied from interface:ExtendedQueryable
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 interfaceExtendedQueryable<T>
-
averageNullableLong
public java.lang.Long averageNullableLong(FunctionExpression<NullableLongFunction1<T>> selector)
Description copied from interface:ExtendedQueryable
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 interfaceExtendedQueryable<T>
-
concat
public Queryable<T> concat(Enumerable<T> source2)
Description copied from interface:ExtendedEnumerable
Concatenates two sequences.- Specified by:
concat
in interfaceExtendedEnumerable<T>
- Specified by:
concat
in interfaceExtendedQueryable<T>
- Overrides:
concat
in classDefaultEnumerable<T>
-
count
public int count(FunctionExpression<Predicate1<T>> predicate)
Description copied from interface:ExtendedQueryable
Returns the number of elements in the specified sequence that satisfies a condition.- Specified by:
count
in interfaceExtendedQueryable<T>
-
first
public T first(FunctionExpression<Predicate1<T>> predicate)
Description copied from interface:ExtendedQueryable
Returns the first element of a sequence that satisfies a specified condition.- Specified by:
first
in interfaceExtendedQueryable<T>
-
firstOrDefault
public T firstOrDefault(FunctionExpression<Predicate1<T>> predicate)
Description copied from interface:ExtendedQueryable
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 interfaceExtendedQueryable<T>
-
groupBy
public <TKey> Queryable<Grouping<TKey,T>> groupBy(FunctionExpression<Function1<T,TKey>> keySelector)
Description copied from interface:ExtendedQueryable
Groups the elements of a sequence according to a specified key selector function.- Specified by:
groupBy
in interfaceExtendedQueryable<T>
-
groupBy
public <TKey> Queryable<Grouping<TKey,T>> groupBy(FunctionExpression<Function1<T,TKey>> keySelector, EqualityComparer<TKey> comparer)
Description copied from interface:ExtendedQueryable
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 interfaceExtendedQueryable<T>
-
groupBy
public <TKey,TElement> Queryable<Grouping<TKey,TElement>> groupBy(FunctionExpression<Function1<T,TKey>> keySelector, FunctionExpression<Function1<T,TElement>> elementSelector)
Description copied from interface:ExtendedQueryable
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 interfaceExtendedQueryable<T>
-
groupBy
public <TKey,TElement> Queryable<Grouping<TKey,TElement>> groupBy(FunctionExpression<Function1<T,TKey>> keySelector, FunctionExpression<Function1<T,TElement>> elementSelector, EqualityComparer<TKey> comparer)
Description copied from interface:ExtendedQueryable
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 interfaceExtendedQueryable<T>
-
groupByK
public <TKey,TResult> Queryable<TResult> groupByK(FunctionExpression<Function1<T,TKey>> keySelector, FunctionExpression<Function2<TKey,Enumerable<T>,TResult>> resultSelector)
Description copied from interface:ExtendedQueryable
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 fromExtendedQueryable.groupBy(org.apache.calcite.linq4j.tree.FunctionExpression, org.apache.calcite.linq4j.tree.FunctionExpression)
, which has the same erasure.- Specified by:
groupByK
in interfaceExtendedQueryable<T>
-
groupByK
public <TKey,TResult> Queryable<TResult> groupByK(FunctionExpression<Function1<T,TKey>> keySelector, FunctionExpression<Function2<TKey,Enumerable<T>,TResult>> resultSelector, EqualityComparer<TKey> comparer)
Description copied from interface:ExtendedQueryable
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 interfaceExtendedQueryable<T>
-
groupBy
public <TKey,TElement,TResult> Queryable<TResult> groupBy(FunctionExpression<Function1<T,TKey>> keySelector, FunctionExpression<Function1<T,TElement>> elementSelector, FunctionExpression<Function2<TKey,Enumerable<TElement>,TResult>> resultSelector)
Description copied from interface:ExtendedQueryable
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 interfaceExtendedQueryable<T>
-
groupBy
public <TKey,TElement,TResult> Queryable<TResult> groupBy(FunctionExpression<Function1<T,TKey>> keySelector, FunctionExpression<Function1<T,TElement>> elementSelector, FunctionExpression<Function2<TKey,Enumerable<TElement>,TResult>> resultSelector, EqualityComparer<TKey> comparer)
Description copied from interface:ExtendedQueryable
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 interfaceExtendedQueryable<T>
-
groupJoin
public <TInner,TKey,TResult> Queryable<TResult> groupJoin(Enumerable<TInner> inner, FunctionExpression<Function1<T,TKey>> outerKeySelector, FunctionExpression<Function1<TInner,TKey>> innerKeySelector, FunctionExpression<Function2<T,Enumerable<TInner>,TResult>> resultSelector)
Description copied from interface:ExtendedQueryable
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 interfaceExtendedQueryable<T>
-
groupJoin
public <TInner,TKey,TResult> Queryable<TResult> groupJoin(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:ExtendedQueryable
Correlates the elements of two sequences based on key equality and groups the results. A specifiedEqualityComparer<TSource>
is used to compare keys.- Specified by:
groupJoin
in interfaceExtendedQueryable<T>
-
join
public <TInner,TKey,TResult> Queryable<TResult> join(Enumerable<TInner> inner, FunctionExpression<Function1<T,TKey>> outerKeySelector, FunctionExpression<Function1<TInner,TKey>> innerKeySelector, FunctionExpression<Function2<T,TInner,TResult>> resultSelector)
Description copied from interface:ExtendedQueryable
Correlates the elements of two sequences based on matching keys. The default equality comparer is used to compare keys.- Specified by:
join
in interfaceExtendedQueryable<T>
-
join
public <TInner,TKey,TResult> Queryable<TResult> join(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:ExtendedQueryable
Correlates the elements of two sequences based on matching keys. A specifiedEqualityComparer<TSource>
is used to compare keys.- Specified by:
join
in interfaceExtendedQueryable<T>
-
last
public T last(FunctionExpression<Predicate1<T>> predicate)
Description copied from interface:ExtendedQueryable
Returns the last element of a sequence that satisfies a specified condition.- Specified by:
last
in interfaceExtendedQueryable<T>
-
lastOrDefault
public T lastOrDefault(FunctionExpression<Predicate1<T>> predicate)
Description copied from interface:ExtendedQueryable
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 interfaceExtendedQueryable<T>
-
longCount
public long longCount(FunctionExpression<Predicate1<T>> predicate)
Description copied from interface:ExtendedQueryable
Returns an long that represents the number of elements in a sequence that satisfy a condition.- Specified by:
longCount
in interfaceExtendedQueryable<T>
-
max
public <TResult extends java.lang.Comparable<TResult>> TResult max(FunctionExpression<Function1<T,TResult>> selector)
Description copied from interface:ExtendedQueryable
Invokes a projection function on each element of a genericIQueryable<TSource>
and returns the maximum resulting value.- Specified by:
max
in interfaceExtendedQueryable<T>
-
min
public <TResult extends java.lang.Comparable<TResult>> TResult min(FunctionExpression<Function1<T,TResult>> selector)
Description copied from interface:ExtendedQueryable
Invokes a projection function on each element of a genericIQueryable<TSource>
and returns the minimum resulting value.- Specified by:
min
in interfaceExtendedQueryable<T>
-
orderBy
public <TKey extends java.lang.Comparable> OrderedQueryable<T> orderBy(FunctionExpression<Function1<T,TKey>> keySelector)
Description copied from interface:ExtendedQueryable
Sorts the elements of a sequence in ascending order according to a key.- Specified by:
orderBy
in interfaceExtendedQueryable<T>
-
orderBy
public <TKey> OrderedQueryable<T> orderBy(FunctionExpression<Function1<T,TKey>> keySelector, java.util.Comparator<TKey> comparator)
Description copied from interface:ExtendedQueryable
Sorts the elements of a sequence in ascending order by using a specified comparer.- Specified by:
orderBy
in interfaceExtendedQueryable<T>
-
orderByDescending
public <TKey extends java.lang.Comparable> OrderedQueryable<T> orderByDescending(FunctionExpression<Function1<T,TKey>> keySelector)
Description copied from interface:ExtendedQueryable
Sorts the elements of a sequence in descending order according to a key.- Specified by:
orderByDescending
in interfaceExtendedQueryable<T>
-
orderByDescending
public <TKey> OrderedQueryable<T> orderByDescending(FunctionExpression<Function1<T,TKey>> keySelector, java.util.Comparator<TKey> comparator)
Description copied from interface:ExtendedQueryable
Sorts the elements of a sequence in descending order by using a specified comparer.- Specified by:
orderByDescending
in interfaceExtendedQueryable<T>
-
select
public <TResult> Queryable<TResult> select(FunctionExpression<Function1<T,TResult>> selector)
Description copied from interface:ExtendedQueryable
Projects each element of a sequence into a new form.- Specified by:
select
in interfaceExtendedQueryable<T>
-
selectN
public <TResult> Queryable<TResult> selectN(FunctionExpression<Function2<T,java.lang.Integer,TResult>> selector)
Description copied from interface:ExtendedQueryable
Projects each element of a sequence into a new form by incorporating the element's index.NOTE: Renamed from
select
because had same erasure asExtendedQueryable.select(org.apache.calcite.linq4j.tree.FunctionExpression)
.- Specified by:
selectN
in interfaceExtendedQueryable<T>
-
selectMany
public <TResult> Queryable<TResult> selectMany(FunctionExpression<Function1<T,Enumerable<TResult>>> selector)
Description copied from interface:ExtendedQueryable
Projects each element of a sequence to anEnumerable<TSource>
and combines the resulting sequences into one sequence.- Specified by:
selectMany
in interfaceExtendedQueryable<T>
-
selectManyN
public <TResult> Queryable<TResult> selectManyN(FunctionExpression<Function2<T,java.lang.Integer,Enumerable<TResult>>> selector)
Description copied from interface:ExtendedQueryable
Projects each element of a sequence to anEnumerable<TSource>
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 asExtendedQueryable.selectMany(org.apache.calcite.linq4j.tree.FunctionExpression)
- Specified by:
selectManyN
in interfaceExtendedQueryable<T>
-
selectMany
public <TCollection,TResult> Queryable<TResult> selectMany(FunctionExpression<Function2<T,java.lang.Integer,Enumerable<TCollection>>> collectionSelector, FunctionExpression<Function2<T,TCollection,TResult>> resultSelector)
Description copied from interface:ExtendedQueryable
Projects each element of a sequence to anEnumerable<TSource>
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 interfaceExtendedQueryable<T>
-
selectManyN
public <TCollection,TResult> Queryable<TResult> selectManyN(FunctionExpression<Function1<T,Enumerable<TCollection>>> collectionSelector, FunctionExpression<Function2<T,TCollection,TResult>> resultSelector)
Description copied from interface:ExtendedQueryable
Projects each element of a sequence to anEnumerable<TSource>
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 asExtendedQueryable.selectMany(org.apache.calcite.linq4j.tree.FunctionExpression, org.apache.calcite.linq4j.tree.FunctionExpression)
- Specified by:
selectManyN
in interfaceExtendedQueryable<T>
-
single
public T single(FunctionExpression<Predicate1<T>> predicate)
Description copied from interface:ExtendedQueryable
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 interfaceExtendedQueryable<T>
-
singleOrDefault
public T singleOrDefault(FunctionExpression<Predicate1<T>> predicate)
Description copied from interface:ExtendedQueryable
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 interfaceExtendedQueryable<T>
-
skipWhile
public Queryable<T> skipWhile(FunctionExpression<Predicate1<T>> predicate)
Description copied from interface:ExtendedQueryable
Bypasses elements in a sequence as long as a specified condition is true and then returns the remaining elements.- Specified by:
skipWhile
in interfaceExtendedQueryable<T>
-
skipWhileN
public Queryable<T> skipWhileN(FunctionExpression<Predicate2<T,java.lang.Integer>> predicate)
Description copied from interface:ExtendedQueryable
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 interfaceExtendedQueryable<T>
-
sumBigDecimal
public java.math.BigDecimal sumBigDecimal(FunctionExpression<BigDecimalFunction1<T>> selector)
Description copied from interface:ExtendedQueryable
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 interfaceExtendedQueryable<T>
-
sumNullableBigDecimal
public java.math.BigDecimal sumNullableBigDecimal(FunctionExpression<NullableBigDecimalFunction1<T>> selector)
Description copied from interface:ExtendedQueryable
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 interfaceExtendedQueryable<T>
-
sumDouble
public double sumDouble(FunctionExpression<DoubleFunction1<T>> selector)
Description copied from interface:ExtendedQueryable
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 interfaceExtendedQueryable<T>
-
sumNullableDouble
public java.lang.Double sumNullableDouble(FunctionExpression<NullableDoubleFunction1<T>> selector)
Description copied from interface:ExtendedQueryable
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 interfaceExtendedQueryable<T>
-
sumInteger
public int sumInteger(FunctionExpression<IntegerFunction1<T>> selector)
Description copied from interface:ExtendedQueryable
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 interfaceExtendedQueryable<T>
-
sumNullableInteger
public java.lang.Integer sumNullableInteger(FunctionExpression<NullableIntegerFunction1<T>> selector)
Description copied from interface:ExtendedQueryable
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 interfaceExtendedQueryable<T>
-
sumLong
public long sumLong(FunctionExpression<LongFunction1<T>> selector)
Description copied from interface:ExtendedQueryable
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 interfaceExtendedQueryable<T>
-
sumNullableLong
public java.lang.Long sumNullableLong(FunctionExpression<NullableLongFunction1<T>> selector)
Description copied from interface:ExtendedQueryable
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 interfaceExtendedQueryable<T>
-
sumFloat
public float sumFloat(FunctionExpression<FloatFunction1<T>> selector)
Description copied from interface:ExtendedQueryable
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 interfaceExtendedQueryable<T>
-
sumNullableFloat
public java.lang.Float sumNullableFloat(FunctionExpression<NullableFloatFunction1<T>> selector)
Description copied from interface:ExtendedQueryable
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 interfaceExtendedQueryable<T>
-
takeWhile
public Queryable<T> takeWhile(FunctionExpression<Predicate1<T>> predicate)
Description copied from interface:ExtendedQueryable
Returns elements from a sequence as long as a specified condition is true.- Specified by:
takeWhile
in interfaceExtendedQueryable<T>
-
takeWhileN
public Queryable<T> takeWhileN(FunctionExpression<Predicate2<T,java.lang.Integer>> predicate)
Description copied from interface:ExtendedQueryable
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 interfaceExtendedQueryable<T>
-
where
public Queryable<T> where(FunctionExpression<? extends Predicate1<T>> predicate)
Description copied from interface:ExtendedQueryable
Filters a sequence of values based on a predicate.- Specified by:
where
in interfaceExtendedQueryable<T>
-
whereN
public Queryable<T> whereN(FunctionExpression<? extends Predicate2<T,java.lang.Integer>> predicate)
Description copied from interface:ExtendedQueryable
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 interfaceExtendedQueryable<T>
-
zip
public <T1,TResult> Queryable<TResult> zip(Enumerable<T1> source1, FunctionExpression<Function2<T,T1,TResult>> resultSelector)
Description copied from interface:ExtendedQueryable
Merges two sequences by using the specified predicate function.- Specified by:
zip
in interfaceExtendedQueryable<T>
-
aggregate
public T aggregate(Function2<T,T,T> func)
Description copied from interface:ExtendedEnumerable
Applies an accumulator function over a sequence.- Specified by:
aggregate
in interfaceExtendedEnumerable<T>
- Overrides:
aggregate
in classDefaultEnumerable<T>
-
aggregate
public <TAccumulate,TResult> TResult aggregate(TAccumulate seed, Function2<TAccumulate,T,TAccumulate> func, Function1<TAccumulate,TResult> selector)
Description copied from interface:ExtendedEnumerable
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 interfaceExtendedEnumerable<T>
- Overrides:
aggregate
in classDefaultEnumerable<T>
-
-