public abstract static class QueryableDefaults.ReplayableQueryable<T> extends DefaultEnumerable<T> implements QueryableDefaults.Replayable<T>
Constructor and Description |
---|
ReplayableQueryable() |
Modifier and Type | Method and Description |
---|---|
TSource |
aggregate(FunctionExpression<Function2<TSource,TSource,TSource>> selector)
Applies an accumulator function over a sequence.
|
T |
aggregate(FunctionExpression<Function2<T,T,T>> selector)
Applies an accumulator function over a sequence.
|
<TAccumulate> |
aggregate(TAccumulate seed,
FunctionExpression<Function2<TAccumulate,TSource,TAccumulate>> selector)
Applies an accumulator function over a
sequence.
|
<TAccumulate,TResult> |
aggregate(TAccumulate seed,
FunctionExpression<Function2<TAccumulate,TSource,TAccumulate>> func,
FunctionExpression<Function1<TAccumulate,TResult>> selector)
Applies an accumulator function over a
sequence.
|
<TAccumulate> |
aggregate(TAccumulate seed,
FunctionExpression<Function2<TAccumulate,T,TAccumulate>> selector)
Applies an accumulator function over a
sequence.
|
<TAccumulate,TResult> |
aggregate(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 |
all(FunctionExpression<Predicate1<TSource>> 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.
|
boolean |
any(FunctionExpression<Predicate1<TSource>> predicate)
Determines whether any element of a sequence
satisfies a condition.
|
Enumerable<T> |
asEnumerable()
Returns the input typed as
Enumerable<TSource> . |
Queryable<T> |
asQueryable()
Converts this Enumerable to a Queryable.
|
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.
|
BigDecimal |
averageBigDecimal(FunctionExpression<BigDecimalFunction1<TSource>> 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.
|
double |
averageDouble(FunctionExpression<DoubleFunction1<TSource>> 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.
|
float |
averageFloat(FunctionExpression<FloatFunction1<TSource>> 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.
|
int |
averageInteger(FunctionExpression<IntegerFunction1<TSource>> 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.
|
long |
averageLong(FunctionExpression<LongFunction1<TSource>> 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.
|
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.
|
BigDecimal |
averageNullableBigDecimal(FunctionExpression<NullableBigDecimalFunction1<TSource>> 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.
|
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.
|
Double |
averageNullableDouble(FunctionExpression<NullableDoubleFunction1<TSource>> 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.
|
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.
|
Float |
averageNullableFloat(FunctionExpression<NullableFloatFunction1<TSource>> 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.
|
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.
|
Integer |
averageNullableInteger(FunctionExpression<NullableIntegerFunction1<TSource>> 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.
|
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.
|
Long |
averageNullableLong(FunctionExpression<NullableLongFunction1<TSource>> 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(Class<T2> clazz)
Converts the elements of this Enumerable to the specified type.
|
<T2> Queryable<T2> |
cast(Class<T2> clazz)
Converts the elements of this Enumerable to the specified type.
|
<U> Queryable<U> |
castQueryable()
Convenience method, for
QueryableRecorder methods that
return a Queryable of a different element type than the source. |
Queryable<T> |
concat(Enumerable<T> source2)
Concatenates two sequences.
|
Queryable<TSource> |
concat(Enumerable<TSource> source2)
Concatenates two sequences.
|
int |
count(FunctionExpression<Predicate1<T>> func)
Returns the number of elements in the specified
sequence that satisfies a condition.
|
int |
count(FunctionExpression<Predicate1<TSource>> predicate)
Returns the number of elements in the specified
sequence that satisfies a condition.
|
Queryable<TSource> |
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> |
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<TSource> |
distinct()
Returns distinct elements from a sequence by using
the default equality comparer to compare values.
|
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 specified
EqualityComparer<TSource> to compare values. |
Queryable<TSource> |
distinct(EqualityComparer<TSource> comparer)
Returns distinct elements from a sequence by using
a specified EqualityComparer<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 specified
EqualityComparer<TSource> to compare
values. |
Queryable<TSource> |
except(Enumerable<TSource> enumerable)
Produces the set difference of two sequences by
using the default equality comparer to compare values.
|
Queryable<TSource> |
except(Enumerable<TSource> enumerable,
EqualityComparer<TSource> comparer)
Produces the set difference of two sequences by
using the specified
EqualityComparer<TSource> to compare
values. |
T |
first(FunctionExpression<Predicate1<T>> predicate)
Returns the first element of a sequence that
satisfies a specified condition.
|
TSource |
first(FunctionExpression<Predicate1<TSource>> 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.
|
TSource |
firstOrDefault(FunctionExpression<Predicate1<TSource>> predicate)
Returns the first element of a sequence that
satisfies a specified condition or a default value if no such
element is found.
|
protected Queryable<T> |
getThis()
Derived classes might wish to override this method to return the "outer"
enumerable.
|
protected OrderedQueryable<T> |
getThisOrderedQueryable() |
<TKey> Queryable<Grouping<TKey,TSource>> |
groupBy(FunctionExpression<Function1<TSource,TKey>> keySelector)
Groups the elements of a sequence according to a
specified key selector function.
|
<TKey> Queryable<Grouping<TKey,TSource>> |
groupBy(FunctionExpression<Function1<TSource,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> |
groupBy(FunctionExpression<Function1<TSource,TKey>> keySelector,
FunctionExpression<Function1<TSource,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> |
groupBy(FunctionExpression<Function1<TSource,TKey>> keySelector,
FunctionExpression<Function1<TSource,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> |
groupBy(FunctionExpression<Function1<TSource,TKey>> keySelector,
FunctionExpression<Function1<TSource,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> |
groupBy(FunctionExpression<Function1<TSource,TKey>> keySelector,
FunctionExpression<Function1<TSource,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> 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> |
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> |
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> |
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> |
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> |
groupByK(FunctionExpression<Function1<TSource,TKey>> keySelector,
FunctionExpression<Function2<TKey,Enumerable<TSource>,TResult>> elementSelector)
Groups the elements of a sequence according to a
specified key selector function and creates a result value from
each group and its key.
|
<TKey,TResult> |
groupByK(FunctionExpression<Function1<TSource,TKey>> keySelector,
FunctionExpression<Function2<TKey,Enumerable<TSource>,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.
|
<TKey,TResult> |
groupByK(FunctionExpression<Function1<T,TKey>> keySelector,
FunctionExpression<Function2<TKey,Enumerable<T>,TResult>> elementSelector)
Groups the elements of a sequence according to a
specified key selector function and creates a result value from
each group and its key.
|
<TKey,TResult> |
groupByK(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> |
groupJoin(Enumerable<TInner> inner,
FunctionExpression<Function1<TSource,TKey>> outerKeySelector,
FunctionExpression<Function1<TInner,TKey>> innerKeySelector,
FunctionExpression<Function2<TSource,Enumerable<TInner>,TResult>> resultSelector)
Correlates the elements of two sequences based on
key equality and groups the results.
|
<TInner,TKey,TResult> |
groupJoin(Enumerable<TInner> inner,
FunctionExpression<Function1<TSource,TKey>> outerKeySelector,
FunctionExpression<Function1<TInner,TKey>> innerKeySelector,
FunctionExpression<Function2<TSource,Enumerable<TInner>,TResult>> resultSelector,
EqualityComparer<TKey> comparer)
Correlates the elements of two sequences based on
key equality and groups the results.
|
<TInner,TKey,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> |
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 specified
EqualityComparer<TSource> to compare
values. |
Queryable<TSource> |
intersect(Enumerable<TSource> enumerable)
Produces the set intersection of two sequences by
using the default equality comparer to compare values.
|
Queryable<TSource> |
intersect(Enumerable<TSource> enumerable,
EqualityComparer<TSource> comparer)
Produces the set intersection of two sequences by
using the specified
EqualityComparer<TSource> to compare
values. |
Iterator<T> |
iterator() |
<TInner,TKey,TResult> |
join(Enumerable<TInner> inner,
FunctionExpression<Function1<TSource,TKey>> outerKeySelector,
FunctionExpression<Function1<TInner,TKey>> innerKeySelector,
FunctionExpression<Function2<TSource,TInner,TResult>> resultSelector)
Correlates the elements of two sequences based on
matching keys.
|
<TInner,TKey,TResult> |
join(Enumerable<TInner> inner,
FunctionExpression<Function1<TSource,TKey>> outerKeySelector,
FunctionExpression<Function1<TInner,TKey>> innerKeySelector,
FunctionExpression<Function2<TSource,TInner,TResult>> resultSelector,
EqualityComparer<TKey> comparer)
Correlates the elements of two sequences based on
matching keys.
|
<TInner,TKey,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> |
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.
|
TSource |
last(FunctionExpression<Predicate1<TSource>> 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.
|
TSource |
lastOrDefault(FunctionExpression<Predicate1<TSource>> 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.
|
long |
longCount(FunctionExpression<Predicate1<TSource>> predicate)
Returns an long that represents the number of
elements in a sequence that satisfy a condition.
|
<TResult extends Comparable<TResult>> |
max(FunctionExpression<Function1<TSource,TResult>> selector)
Invokes a projection function on each element of a
generic
IQueryable<TSource> and returns the maximum resulting
value. |
<TResult extends Comparable<TResult>> |
max(FunctionExpression<Function1<T,TResult>> selector)
Invokes a projection function on each element of a
generic
IQueryable<TSource> and returns the maximum resulting
value. |
<TResult extends Comparable<TResult>> |
min(FunctionExpression<Function1<TSource,TResult>> selector)
Invokes a projection function on each element of a
generic
IQueryable<TSource> and returns the minimum resulting
value. |
<TResult extends Comparable<TResult>> |
min(FunctionExpression<Function1<T,TResult>> selector)
Invokes a projection function on each element of a
generic
IQueryable<TSource> and returns the minimum resulting
value. |
<TResult> Queryable<TResult> |
ofType(Class<TResult> clazz)
Filters the elements of an IQueryable based on a
specified type.
|
<TResult> Queryable<TResult> |
ofType(Class<TResult> clazz)
Filters the elements of an Enumerable based on a
specified type.
|
<TKey extends Comparable> |
orderBy(FunctionExpression<Function1<TSource,TKey>> keySelector)
Sorts the elements of a sequence in ascending
order according to a key.
|
<TKey> OrderedQueryable<TSource> |
orderBy(FunctionExpression<Function1<TSource,TKey>> keySelector,
Comparator<TKey> comparator)
Sorts the elements of a sequence in ascending
order by using a specified comparer.
|
<TKey extends Comparable> |
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,
Comparator<TKey> comparator)
Sorts the elements of a sequence in ascending
order by using a specified comparer.
|
<TKey extends Comparable> |
orderByDescending(FunctionExpression<Function1<TSource,TKey>> keySelector)
Sorts the elements of a sequence in descending
order according to a key.
|
<TKey> OrderedQueryable<TSource> |
orderByDescending(FunctionExpression<Function1<TSource,TKey>> keySelector,
Comparator<TKey> comparator)
Sorts the elements of a sequence in descending
order by using a specified comparer.
|
<TKey extends Comparable> |
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,
Comparator<TKey> comparator)
Sorts the elements of a sequence in descending
order by using a specified comparer.
|
void |
replay(QueryableFactory<T> factory) |
Queryable<TSource> |
reverse()
Inverts the order of the elements in a sequence.
|
Queryable<T> |
reverse()
Inverts the order of the elements in a
sequence.
|
<TResult> Queryable<TResult> |
select(FunctionExpression<Function1<TSource,TResult>> selector)
Projects each element of a sequence into a new form.
|
<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 an
Enumerable<TSource> and combines the resulting sequences into one
sequence. |
<TResult> Queryable<TResult> |
selectMany(FunctionExpression<Function1<TSource,Enumerable<TResult>>> selector)
Projects each element of a sequence to an
Enumerable<TSource> and combines the resulting sequences into one
sequence. |
<TCollection,TResult> |
selectMany(FunctionExpression<Function2<T,Integer,Enumerable<TCollection>>> collectionSelector,
FunctionExpression<Function2<T,TCollection,TResult>> resultSelector)
Projects each element of a sequence to an
Enumerable<TSource> that incorporates the index of the source
element that produced it. |
<TCollection,TResult> |
selectMany(FunctionExpression<Function2<TSource,Integer,Enumerable<TCollection>>> collectionSelector,
FunctionExpression<Function2<TSource,TCollection,TResult>> resultSelector)
Projects each element of a sequence to an
Enumerable<TSource> that incorporates the index of the source
element that produced it. |
<TCollection,TResult> |
selectManyN(FunctionExpression<Function1<T,Enumerable<TCollection>>> collectionSelector,
FunctionExpression<Function2<T,TCollection,TResult>> resultSelector)
Projects each element of a sequence to an
Enumerable<TSource> and invokes a result selector function on each
element therein. |
<TCollection,TResult> |
selectManyN(FunctionExpression<Function1<TSource,Enumerable<TCollection>>> collectionSelector,
FunctionExpression<Function2<TSource,TCollection,TResult>> resultSelector)
Projects each element of a sequence to an
Enumerable<TSource> and invokes a result selector function on each
element therein. |
<TResult> Queryable<TResult> |
selectManyN(FunctionExpression<Function2<T,Integer,Enumerable<TResult>>> selector)
Projects each element of a sequence to an
Enumerable<TSource> and combines the resulting sequences into one
sequence. |
<TResult> Queryable<TResult> |
selectManyN(FunctionExpression<Function2<TSource,Integer,Enumerable<TResult>>> selector)
Projects each element of a sequence to an
Enumerable<TSource> and combines the resulting sequences into one
sequence. |
<TResult> Queryable<TResult> |
selectN(FunctionExpression<Function2<T,Integer,TResult>> selector)
Projects each element of a sequence into a new
form by incorporating the element's index.
|
<TResult> Queryable<TResult> |
selectN(FunctionExpression<Function2<TSource,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.
|
TSource |
single(FunctionExpression<Predicate1<TSource>> predicate)
Returns the only element of a sequence that
satisfies a specified condition, and throws an exception if
more than one such element exists.
|
TSource |
singleOrDefault()
Returns the only element of a sequence, or a
default value if the sequence is empty; this method throws an
exception if there is more than one element in the
sequence.
|
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.
|
TSource |
singleOrDefault(FunctionExpression<Predicate1<TSource>> 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<TSource> |
skip(int count)
Bypasses a specified number of elements in a
sequence and then returns the remaining elements.
|
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<TSource> |
skipWhile(FunctionExpression<Predicate1<TSource>> 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,Integer>> predicate)
Bypasses elements in a sequence as long as a
specified condition is true and then returns the remaining
elements.
|
Queryable<TSource> |
skipWhileN(FunctionExpression<Predicate2<TSource,Integer>> predicate)
Bypasses elements in a sequence as long as a
specified condition is true and then returns the remaining
elements.
|
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.
|
BigDecimal |
sumBigDecimal(FunctionExpression<BigDecimalFunction1<TSource>> 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.
|
double |
sumDouble(FunctionExpression<DoubleFunction1<TSource>> 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.
|
float |
sumFloat(FunctionExpression<FloatFunction1<TSource>> 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.
|
int |
sumInteger(FunctionExpression<IntegerFunction1<TSource>> 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.
|
long |
sumLong(FunctionExpression<LongFunction1<TSource>> 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.
|
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.
|
BigDecimal |
sumNullableBigDecimal(FunctionExpression<NullableBigDecimalFunction1<TSource>> 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.
|
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.
|
Double |
sumNullableDouble(FunctionExpression<NullableDoubleFunction1<TSource>> 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.
|
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.
|
Float |
sumNullableFloat(FunctionExpression<NullableFloatFunction1<TSource>> 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.
|
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.
|
Integer |
sumNullableInteger(FunctionExpression<NullableIntegerFunction1<TSource>> 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.
|
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.
|
Long |
sumNullableLong(FunctionExpression<NullableLongFunction1<TSource>> 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<TSource> |
take(int count)
Returns a specified number of contiguous elements
from the start of a 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<TSource> |
takeWhile(FunctionExpression<Predicate1<TSource>> predicate)
Returns elements from a sequence as long as a
specified condition is true.
|
Queryable<T> |
takeWhileN(FunctionExpression<Predicate2<T,Integer>> predicate)
Returns elements from a sequence as long as a
specified condition is true.
|
Queryable<TSource> |
takeWhileN(FunctionExpression<Predicate2<TSource,Integer>> predicate)
Returns elements from a sequence as long as a
specified condition is true.
|
<TKey extends Comparable<TKey>> |
thenBy(FunctionExpression<Function1<T,TKey>> keySelector)
Performs a subsequent ordering of the elements in a sequence in
ascending order according to a key.
|
<TKey> OrderedQueryable<T> |
thenBy(FunctionExpression<Function1<T,TKey>> keySelector,
Comparator<TKey> comparator)
Performs a subsequent ordering of the elements in a sequence in
ascending order according to a key, using a specified comparator.
|
<TKey extends Comparable<TKey>> |
thenByDescending(FunctionExpression<Function1<T,TKey>> keySelector)
Performs a subsequent ordering of the elements in a sequence in
descending order according to a key.
|
<TKey> OrderedQueryable<T> |
thenByDescending(FunctionExpression<Function1<T,TKey>> keySelector,
Comparator<TKey> comparator)
Performs a subsequent ordering of the elements in a sequence in
descending order according to a key, using a specified comparator.
|
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
specified
EqualityComparer<TSource> . |
Queryable<TSource> |
union(Enumerable<TSource> source1)
Produces the set union of two sequences by using
the default equality comparer.
|
Queryable<TSource> |
union(Enumerable<TSource> source1,
EqualityComparer<TSource> comparer)
Produces the set union of two sequences by using a
specified
EqualityComparer<TSource> . |
Queryable<T> |
where(FunctionExpression<? extends Predicate1<T>> predicate)
Filters a sequence of values based on a
predicate.
|
Queryable<TSource> |
where(FunctionExpression<? extends Predicate1<TSource>> predicate)
Filters a sequence of values based on a
predicate.
|
Queryable<T> |
whereN(FunctionExpression<? extends Predicate2<T,Integer>> predicate)
Filters a sequence of values based on a
predicate.
|
Queryable<TSource> |
whereN(FunctionExpression<? extends Predicate2<TSource,Integer>> predicate)
Filters a sequence of values based on a
predicate.
|
<T1,TResult> |
zip(Enumerable<T1> source1,
FunctionExpression<Function2<TSource,T1,TResult>> resultSelector)
Merges two sequences by using the specified
predicate function.
|
<T1,TResult> |
zip(Enumerable<T1> source1,
FunctionExpression<Function2<T,T1,TResult>> resultSelector)
Merges two sequences by using the specified
predicate function.
|
aggregate, aggregate, aggregate, all, any, any, asOrderedQueryable, average, average, average, average, average, average, average, average, average, average, contains, contains, 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, 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
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getElementType, getExpression, getProvider
asQueryable
forEach, spliterator
aggregate, aggregate, aggregate, all, any, any, asEnumerable, average, average, average, average, average, average, average, average, average, average, cast, concat, contains, contains, count, count, defaultIfEmpty, defaultIfEmpty, distinct, distinct, elementAt, elementAtOrDefault, except, except, first, first, firstOrDefault, firstOrDefault, foreach, groupBy, groupBy, groupBy, groupBy, groupBy, groupBy, groupBy, groupBy, groupBy, groupBy, groupJoin, groupJoin, intersect, intersect, 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, ofType, orderBy, orderBy, orderByDescending, orderByDescending, reverse, select, select, selectMany, selectMany, selectMany, selectMany, sequenceEqual, sequenceEqual, single, single, singleOrDefault, singleOrDefault, skip, skipWhile, skipWhile, sum, sum, sum, sum, sum, sum, sum, sum, sum, sum, take, takeWhile, takeWhile, toList, toLookup, toLookup, toLookup, toLookup, toMap, toMap, toMap, toMap, union, union, where, where, zip
public void replay(QueryableFactory<T> factory)
replay
in interface QueryableDefaults.Replayable<T>
public Enumerator<T> enumerator()
RawEnumerable
enumerator
in interface RawEnumerable<T>
public <U> Queryable<U> castQueryable()
QueryableRecorder
methods that
return a Queryable of a different element type than the source.public TSource aggregate(FunctionExpression<Function2<TSource,TSource,TSource>> selector)
public <TAccumulate> TAccumulate aggregate(TAccumulate seed, FunctionExpression<Function2<TAccumulate,TSource,TAccumulate>> selector)
public <TAccumulate,TResult> TResult aggregate(TAccumulate seed, FunctionExpression<Function2<TAccumulate,TSource,TAccumulate>> func, FunctionExpression<Function1<TAccumulate,TResult>> selector)
public boolean all(FunctionExpression<Predicate1<TSource>> predicate)
public boolean any(FunctionExpression<Predicate1<TSource>> predicate)
public BigDecimal averageBigDecimal(FunctionExpression<BigDecimalFunction1<TSource>> selector)
public BigDecimal averageNullableBigDecimal(FunctionExpression<NullableBigDecimalFunction1<TSource>> selector)
public double averageDouble(FunctionExpression<DoubleFunction1<TSource>> selector)
public Double averageNullableDouble(FunctionExpression<NullableDoubleFunction1<TSource>> selector)
public int averageInteger(FunctionExpression<IntegerFunction1<TSource>> selector)
public Integer averageNullableInteger(FunctionExpression<NullableIntegerFunction1<TSource>> selector)
public float averageFloat(FunctionExpression<FloatFunction1<TSource>> selector)
public Float averageNullableFloat(FunctionExpression<NullableFloatFunction1<TSource>> selector)
public long averageLong(FunctionExpression<LongFunction1<TSource>> selector)
public Long averageNullableLong(FunctionExpression<NullableLongFunction1<TSource>> selector)
public Queryable<TSource> concat(Enumerable<TSource> source2)
concat
in interface ExtendedEnumerable<TSource>
public int count(FunctionExpression<Predicate1<TSource>> predicate)
public Queryable<TSource> defaultIfEmpty()
defaultIfEmpty
in interface ExtendedEnumerable<TSource>
public Queryable<TSource> distinct()
distinct
in interface ExtendedEnumerable<TSource>
public Queryable<TSource> distinct(EqualityComparer<TSource> comparer)
distinct
in interface ExtendedEnumerable<TSource>
public Queryable<TSource> except(Enumerable<TSource> enumerable)
except
in interface ExtendedEnumerable<TSource>
public Queryable<TSource> except(Enumerable<TSource> enumerable, EqualityComparer<TSource> comparer)
EqualityComparer<TSource>
to compare
values.except
in interface ExtendedEnumerable<TSource>
public TSource first(FunctionExpression<Predicate1<TSource>> predicate)
public TSource firstOrDefault(FunctionExpression<Predicate1<TSource>> predicate)
public <TKey> Queryable<Grouping<TKey,TSource>> groupBy(FunctionExpression<Function1<TSource,TKey>> keySelector)
public <TKey> Queryable<Grouping<TKey,TSource>> groupBy(FunctionExpression<Function1<TSource,TKey>> keySelector, EqualityComparer<TKey> comparer)
public <TKey,TElement> Queryable<Grouping<TKey,TElement>> groupBy(FunctionExpression<Function1<TSource,TKey>> keySelector, FunctionExpression<Function1<TSource,TElement>> elementSelector)
public <TKey,TResult> Queryable<Grouping<TKey,TResult>> groupByK(FunctionExpression<Function1<TSource,TKey>> keySelector, FunctionExpression<Function2<TKey,Enumerable<TSource>,TResult>> elementSelector)
NOTE: Renamed from groupBy
to distinguish from
groupBy(net.hydromatic.linq4j.expressions.FunctionExpression, net.hydromatic.linq4j.expressions.FunctionExpression)
,
which has the same erasure.
public <TKey,TElement> Queryable<Grouping<TKey,TElement>> groupBy(FunctionExpression<Function1<TSource,TKey>> keySelector, FunctionExpression<Function1<TSource,TElement>> elementSelector, EqualityComparer<TKey> comparer)
public <TKey,TResult> Queryable<TResult> groupByK(FunctionExpression<Function1<TSource,TKey>> keySelector, FunctionExpression<Function2<TKey,Enumerable<TSource>,TResult>> elementSelector, EqualityComparer<TKey> comparer)
public <TKey,TElement,TResult> Queryable<TResult> groupBy(FunctionExpression<Function1<TSource,TKey>> keySelector, FunctionExpression<Function1<TSource,TElement>> elementSelector, FunctionExpression<Function2<TKey,Enumerable<TElement>,TResult>> resultSelector)
public <TKey,TElement,TResult> Queryable<TResult> groupBy(FunctionExpression<Function1<TSource,TKey>> keySelector, FunctionExpression<Function1<TSource,TElement>> elementSelector, FunctionExpression<Function2<TKey,Enumerable<TElement>,TResult>> resultSelector, EqualityComparer<TKey> comparer)
public <TInner,TKey,TResult> Queryable<TResult> groupJoin(Enumerable<TInner> inner, FunctionExpression<Function1<TSource,TKey>> outerKeySelector, FunctionExpression<Function1<TInner,TKey>> innerKeySelector, FunctionExpression<Function2<TSource,Enumerable<TInner>,TResult>> resultSelector)
public <TInner,TKey,TResult> Queryable<TResult> groupJoin(Enumerable<TInner> inner, FunctionExpression<Function1<TSource,TKey>> outerKeySelector, FunctionExpression<Function1<TInner,TKey>> innerKeySelector, FunctionExpression<Function2<TSource,Enumerable<TInner>,TResult>> resultSelector, EqualityComparer<TKey> comparer)
EqualityComparer<TSource>
is used to compare keys.public Queryable<TSource> intersect(Enumerable<TSource> enumerable)
intersect
in interface ExtendedEnumerable<TSource>
public Queryable<TSource> intersect(Enumerable<TSource> enumerable, EqualityComparer<TSource> comparer)
EqualityComparer<TSource>
to compare
values.intersect
in interface ExtendedEnumerable<TSource>
public <TInner,TKey,TResult> Queryable<TResult> join(Enumerable<TInner> inner, FunctionExpression<Function1<TSource,TKey>> outerKeySelector, FunctionExpression<Function1<TInner,TKey>> innerKeySelector, FunctionExpression<Function2<TSource,TInner,TResult>> resultSelector)
public <TInner,TKey,TResult> Queryable<TResult> join(Enumerable<TInner> inner, FunctionExpression<Function1<TSource,TKey>> outerKeySelector, FunctionExpression<Function1<TInner,TKey>> innerKeySelector, FunctionExpression<Function2<TSource,TInner,TResult>> resultSelector, EqualityComparer<TKey> comparer)
EqualityComparer<TSource>
is used to
compare keys.public TSource last(FunctionExpression<Predicate1<TSource>> predicate)
public TSource lastOrDefault(FunctionExpression<Predicate1<TSource>> predicate)
public long longCount(FunctionExpression<Predicate1<TSource>> predicate)
public <TResult extends Comparable<TResult>> TResult max(FunctionExpression<Function1<TSource,TResult>> selector)
IQueryable<TSource>
and returns the maximum resulting
value.public <TResult extends Comparable<TResult>> TResult min(FunctionExpression<Function1<TSource,TResult>> selector)
IQueryable<TSource>
and returns the minimum resulting
value.public <TResult> Queryable<TResult> ofType(Class<TResult> clazz)
The OfType method generates a
MethodCallExpression
that represents
calling OfType itself as a constructed generic method. It then passes the
MethodCallExpression to the CreateQuery(Expression) method of the
QueryProvider
represented by the Provider property of the source
parameter.
The query behavior that occurs as a result of executing an expression tree that represents calling OfType depends on the implementation of the type of the source parameter. The expected behavior is that it filters out any elements in source that are not of type TResult.
NOTE: clazz parameter not present in C# LINQ; necessary because of Java type erasure.
ofType
in interface ExtendedEnumerable<TSource>
TResult
- Target typeclazz
- Target typepublic <T2> Queryable<T2> cast(Class<T2> clazz)
ExtendedEnumerable
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 using
for (... in ...)
.
If an element cannot be cast to type TResult, the
Enumerator.current()
method will throw a
ClassCastException
a exception when the element it accessed. To
obtain only those elements that can be cast to type TResult, use the
ExtendedEnumerable.ofType(Class)
method instead.
cast
in interface ExtendedEnumerable<TSource>
EnumerableDefaults.cast(net.hydromatic.linq4j.Enumerable<TSource>, java.lang.Class<T2>)
,
ExtendedEnumerable.ofType(Class)
public <TKey extends Comparable> OrderedQueryable<TSource> orderBy(FunctionExpression<Function1<TSource,TKey>> keySelector)
public <TKey> OrderedQueryable<TSource> orderBy(FunctionExpression<Function1<TSource,TKey>> keySelector, Comparator<TKey> comparator)
public <TKey extends Comparable> OrderedQueryable<TSource> orderByDescending(FunctionExpression<Function1<TSource,TKey>> keySelector)
public <TKey> OrderedQueryable<TSource> orderByDescending(FunctionExpression<Function1<TSource,TKey>> keySelector, Comparator<TKey> comparator)
public Queryable<TSource> reverse()
reverse
in interface ExtendedEnumerable<TSource>
public <TResult> Queryable<TResult> select(FunctionExpression<Function1<TSource,TResult>> selector)
public <TResult> Queryable<TResult> selectN(FunctionExpression<Function2<TSource,Integer,TResult>> selector)
NOTE: Renamed from select
because had same erasure as
select(net.hydromatic.linq4j.expressions.FunctionExpression)
.
public <TResult> Queryable<TResult> selectMany(FunctionExpression<Function1<TSource,Enumerable<TResult>>> selector)
Enumerable<TSource>
and combines the resulting sequences into one
sequence.public <TResult> Queryable<TResult> selectManyN(FunctionExpression<Function2<TSource,Integer,Enumerable<TResult>>> selector)
Enumerable<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 as
selectMany(net.hydromatic.linq4j.expressions.FunctionExpression)
public <TCollection,TResult> Queryable<TResult> selectMany(FunctionExpression<Function2<TSource,Integer,Enumerable<TCollection>>> collectionSelector, FunctionExpression<Function2<TSource,TCollection,TResult>> resultSelector)
Enumerable<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.public <TCollection,TResult> Queryable<TResult> selectManyN(FunctionExpression<Function1<TSource,Enumerable<TCollection>>> collectionSelector, FunctionExpression<Function2<TSource,TCollection,TResult>> resultSelector)
Enumerable<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 as
selectMany(net.hydromatic.linq4j.expressions.FunctionExpression, net.hydromatic.linq4j.expressions.FunctionExpression)
public TSource single(FunctionExpression<Predicate1<TSource>> predicate)
public TSource singleOrDefault()
singleOrDefault
in interface ExtendedEnumerable<TSource>
public TSource singleOrDefault(FunctionExpression<Predicate1<TSource>> predicate)
public Queryable<TSource> skip(int count)
skip
in interface ExtendedEnumerable<TSource>
public Queryable<TSource> skipWhile(FunctionExpression<Predicate1<TSource>> predicate)
public Queryable<TSource> skipWhileN(FunctionExpression<Predicate2<TSource,Integer>> predicate)
public BigDecimal sumBigDecimal(FunctionExpression<BigDecimalFunction1<TSource>> selector)
public BigDecimal sumNullableBigDecimal(FunctionExpression<NullableBigDecimalFunction1<TSource>> selector)
public double sumDouble(FunctionExpression<DoubleFunction1<TSource>> selector)
public Double sumNullableDouble(FunctionExpression<NullableDoubleFunction1<TSource>> selector)
public int sumInteger(FunctionExpression<IntegerFunction1<TSource>> selector)
public Integer sumNullableInteger(FunctionExpression<NullableIntegerFunction1<TSource>> selector)
public long sumLong(FunctionExpression<LongFunction1<TSource>> selector)
public Long sumNullableLong(FunctionExpression<NullableLongFunction1<TSource>> selector)
public float sumFloat(FunctionExpression<FloatFunction1<TSource>> selector)
public Float sumNullableFloat(FunctionExpression<NullableFloatFunction1<TSource>> selector)
public Queryable<TSource> take(int count)
take
in interface ExtendedEnumerable<TSource>
public Queryable<TSource> takeWhile(FunctionExpression<Predicate1<TSource>> predicate)
public Queryable<TSource> takeWhileN(FunctionExpression<Predicate2<TSource,Integer>> predicate)
public Queryable<TSource> union(Enumerable<TSource> source1)
union
in interface ExtendedEnumerable<TSource>
public Queryable<TSource> union(Enumerable<TSource> source1, EqualityComparer<TSource> comparer)
EqualityComparer<TSource>
.union
in interface ExtendedEnumerable<TSource>
public Queryable<TSource> where(FunctionExpression<? extends Predicate1<TSource>> predicate)
public Queryable<TSource> whereN(FunctionExpression<? extends Predicate2<TSource,Integer>> predicate)
public <T1,TResult> Queryable<TResult> zip(Enumerable<T1> source1, FunctionExpression<Function2<TSource,T1,TResult>> resultSelector)
protected Queryable<T> getThis()
DefaultEnumerable
getThis
in class DefaultEnumerable<T>
protected OrderedQueryable<T> getThisOrderedQueryable()
public Enumerable<T> asEnumerable()
ExtendedEnumerable
Enumerable<TSource>
.
This method has no effect
other than to change the compile-time type of source from a type that
implements Enumerable<TSource>
to Enumerable<TSource>
itself.
asEnumerable<TSource>(Enumerable<TSource>)
can be used to choose
between query implementations when a sequence implements
Enumerable<TSource>
but also has a different set of public query
methods available. For example, given a generic class Table that implements
Enumerable<TSource>
and has its own methods such as where
,
select
, and selectMany
, a call to where
would
invoke the public where
method of Table
. A Table
type that represents a database table could have a where
method
that takes the predicate argument as an expression tree and converts the
tree to SQL for remote execution. If remote execution is not desired, for
example because the predicate invokes a local method, the
asEnumerable<TSource>
method can be used to hide the custom methods
and instead make the standard query operators available.
asEnumerable
in interface ExtendedEnumerable<T>
asEnumerable
in class DefaultEnumerable<T>
public Queryable<T> union(Enumerable<T> source1)
ExtendedEnumerable
union
in interface ExtendedEnumerable<T>
union
in class DefaultEnumerable<T>
public Queryable<T> union(Enumerable<T> source1, EqualityComparer<T> comparer)
ExtendedEnumerable
EqualityComparer<TSource>
.union
in interface ExtendedEnumerable<T>
union
in class DefaultEnumerable<T>
public Queryable<T> intersect(Enumerable<T> source1)
ExtendedEnumerable
intersect
in interface ExtendedEnumerable<T>
intersect
in class DefaultEnumerable<T>
public Queryable<T> intersect(Enumerable<T> source1, EqualityComparer<T> comparer)
ExtendedEnumerable
EqualityComparer<TSource>
to compare
values.intersect
in interface ExtendedEnumerable<T>
intersect
in class DefaultEnumerable<T>
public Queryable<T> except(Enumerable<T> enumerable1, EqualityComparer<T> comparer)
ExtendedEnumerable
EqualityComparer<TSource>
to compare
values.except
in interface ExtendedEnumerable<T>
except
in class DefaultEnumerable<T>
public Queryable<T> except(Enumerable<T> enumerable1)
ExtendedEnumerable
except
in interface ExtendedEnumerable<T>
except
in class DefaultEnumerable<T>
public Queryable<T> take(int count)
ExtendedEnumerable
take
in interface ExtendedEnumerable<T>
take
in class DefaultEnumerable<T>
public Queryable<T> skip(int count)
ExtendedEnumerable
skip
in interface ExtendedEnumerable<T>
skip
in class DefaultEnumerable<T>
public Queryable<T> reverse()
ExtendedEnumerable
reverse
in interface ExtendedEnumerable<T>
reverse
in class DefaultEnumerable<T>
public Queryable<T> distinct()
ExtendedEnumerable
distinct
in interface ExtendedEnumerable<T>
distinct
in class DefaultEnumerable<T>
public Queryable<T> distinct(EqualityComparer<T> comparer)
ExtendedEnumerable
EqualityComparer<TSource>
to compare values.distinct
in interface ExtendedEnumerable<T>
distinct
in class DefaultEnumerable<T>
public <TResult> Queryable<TResult> ofType(Class<TResult> clazz)
ExtendedEnumerable
Analogous to LINQ's Enumerable.OfType extension method.
ofType
in interface ExtendedEnumerable<T>
ofType
in class DefaultEnumerable<T>
TResult
- Target typeclazz
- Target typepublic Queryable<T> defaultIfEmpty()
ExtendedEnumerable
defaultIfEmpty
in interface ExtendedEnumerable<T>
defaultIfEmpty
in class DefaultEnumerable<T>
public Queryable<T> asQueryable()
Enumerable
asQueryable
in interface Enumerable<T>
asQueryable
in interface ExtendedEnumerable<T>
asQueryable
in class DefaultEnumerable<T>
EnumerableDefaults.asQueryable(Enumerable)
public <T2> Queryable<T2> cast(Class<T2> clazz)
ExtendedEnumerable
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 using
for (... in ...)
.
If an element cannot be cast to type TResult, the
Enumerator.current()
method will throw a
ClassCastException
a exception when the element it accessed. To
obtain only those elements that can be cast to type TResult, use the
ExtendedEnumerable.ofType(Class)
method instead.
cast
in interface ExtendedEnumerable<T>
cast
in class DefaultEnumerable<T>
EnumerableDefaults.cast(net.hydromatic.linq4j.Enumerable<TSource>, java.lang.Class<T2>)
,
ExtendedEnumerable.ofType(Class)
public T aggregate(FunctionExpression<Function2<T,T,T>> selector)
public <TAccumulate> TAccumulate aggregate(TAccumulate seed, FunctionExpression<Function2<TAccumulate,T,TAccumulate>> selector)
public <TAccumulate,TResult> TResult aggregate(TAccumulate seed, FunctionExpression<Function2<TAccumulate,T,TAccumulate>> func, FunctionExpression<Function1<TAccumulate,TResult>> selector)
public boolean all(FunctionExpression<Predicate1<T>> predicate)
public boolean any(FunctionExpression<Predicate1<T>> predicate)
public BigDecimal averageBigDecimal(FunctionExpression<BigDecimalFunction1<T>> selector)
public BigDecimal averageNullableBigDecimal(FunctionExpression<NullableBigDecimalFunction1<T>> selector)
public double averageDouble(FunctionExpression<DoubleFunction1<T>> selector)
public Double averageNullableDouble(FunctionExpression<NullableDoubleFunction1<T>> selector)
public int averageInteger(FunctionExpression<IntegerFunction1<T>> selector)
public Integer averageNullableInteger(FunctionExpression<NullableIntegerFunction1<T>> selector)
public float averageFloat(FunctionExpression<FloatFunction1<T>> selector)
public Float averageNullableFloat(FunctionExpression<NullableFloatFunction1<T>> selector)
public long averageLong(FunctionExpression<LongFunction1<T>> selector)
public Long averageNullableLong(FunctionExpression<NullableLongFunction1<T>> selector)
public Queryable<T> concat(Enumerable<T> source2)
ExtendedEnumerable
concat
in interface ExtendedEnumerable<T>
concat
in class DefaultEnumerable<T>
public int count(FunctionExpression<Predicate1<T>> func)
public T first(FunctionExpression<Predicate1<T>> predicate)
public T firstOrDefault(FunctionExpression<Predicate1<T>> predicate)
public <TKey> Queryable<Grouping<TKey,T>> groupBy(FunctionExpression<Function1<T,TKey>> keySelector)
public <TKey> Queryable<Grouping<TKey,T>> groupBy(FunctionExpression<Function1<T,TKey>> keySelector, EqualityComparer<TKey> comparer)
public <TKey,TElement> Queryable<Grouping<TKey,TElement>> groupBy(FunctionExpression<Function1<T,TKey>> keySelector, FunctionExpression<Function1<T,TElement>> elementSelector)
public <TKey,TResult> Queryable<Grouping<TKey,TResult>> groupByK(FunctionExpression<Function1<T,TKey>> keySelector, FunctionExpression<Function2<TKey,Enumerable<T>,TResult>> elementSelector)
NOTE: Renamed from groupBy
to distinguish from
groupBy(net.hydromatic.linq4j.expressions.FunctionExpression, net.hydromatic.linq4j.expressions.FunctionExpression)
,
which has the same erasure.
public <TKey,TElement> Queryable<Grouping<TKey,TElement>> groupBy(FunctionExpression<Function1<T,TKey>> keySelector, FunctionExpression<Function1<T,TElement>> elementSelector, EqualityComparer<TKey> comparer)
public <TKey,TResult> Queryable<TResult> groupByK(FunctionExpression<Function1<T,TKey>> keySelector, FunctionExpression<Function2<TKey,Enumerable<T>,TResult>> elementSelector, EqualityComparer<TKey> comparer)
public <TKey,TElement,TResult> Queryable<TResult> groupBy(FunctionExpression<Function1<T,TKey>> keySelector, FunctionExpression<Function1<T,TElement>> elementSelector, FunctionExpression<Function2<TKey,Enumerable<TElement>,TResult>> resultSelector)
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)
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)
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)
EqualityComparer<TSource>
is used to compare keys.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)
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)
EqualityComparer<TSource>
is used to
compare keys.public T last(FunctionExpression<Predicate1<T>> predicate)
public T lastOrDefault(FunctionExpression<Predicate1<T>> predicate)
public long longCount(FunctionExpression<Predicate1<T>> predicate)
public <TResult extends Comparable<TResult>> TResult max(FunctionExpression<Function1<T,TResult>> selector)
IQueryable<TSource>
and returns the maximum resulting
value.public <TResult extends Comparable<TResult>> TResult min(FunctionExpression<Function1<T,TResult>> selector)
IQueryable<TSource>
and returns the minimum resulting
value.public <TKey extends Comparable> OrderedQueryable<T> orderBy(FunctionExpression<Function1<T,TKey>> keySelector)
public <TKey> OrderedQueryable<T> orderBy(FunctionExpression<Function1<T,TKey>> keySelector, Comparator<TKey> comparator)
public <TKey extends Comparable> OrderedQueryable<T> orderByDescending(FunctionExpression<Function1<T,TKey>> keySelector)
public <TKey> OrderedQueryable<T> orderByDescending(FunctionExpression<Function1<T,TKey>> keySelector, Comparator<TKey> comparator)
public <TResult> Queryable<TResult> select(FunctionExpression<Function1<T,TResult>> selector)
public <TResult> Queryable<TResult> selectN(FunctionExpression<Function2<T,Integer,TResult>> selector)
NOTE: Renamed from select
because had same erasure as
select(net.hydromatic.linq4j.expressions.FunctionExpression)
.
public <TResult> Queryable<TResult> selectMany(FunctionExpression<Function1<T,Enumerable<TResult>>> selector)
Enumerable<TSource>
and combines the resulting sequences into one
sequence.public <TResult> Queryable<TResult> selectManyN(FunctionExpression<Function2<T,Integer,Enumerable<TResult>>> selector)
Enumerable<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 as
selectMany(net.hydromatic.linq4j.expressions.FunctionExpression)
public <TCollection,TResult> Queryable<TResult> selectMany(FunctionExpression<Function2<T,Integer,Enumerable<TCollection>>> collectionSelector, FunctionExpression<Function2<T,TCollection,TResult>> resultSelector)
Enumerable<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.public <TCollection,TResult> Queryable<TResult> selectManyN(FunctionExpression<Function1<T,Enumerable<TCollection>>> collectionSelector, FunctionExpression<Function2<T,TCollection,TResult>> resultSelector)
Enumerable<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 as
selectMany(net.hydromatic.linq4j.expressions.FunctionExpression, net.hydromatic.linq4j.expressions.FunctionExpression)
public T single(FunctionExpression<Predicate1<T>> predicate)
public T singleOrDefault(FunctionExpression<Predicate1<T>> predicate)
public Queryable<T> skipWhile(FunctionExpression<Predicate1<T>> predicate)
public Queryable<T> skipWhileN(FunctionExpression<Predicate2<T,Integer>> predicate)
public BigDecimal sumBigDecimal(FunctionExpression<BigDecimalFunction1<T>> selector)
public BigDecimal sumNullableBigDecimal(FunctionExpression<NullableBigDecimalFunction1<T>> selector)
public double sumDouble(FunctionExpression<DoubleFunction1<T>> selector)
public Double sumNullableDouble(FunctionExpression<NullableDoubleFunction1<T>> selector)
public int sumInteger(FunctionExpression<IntegerFunction1<T>> selector)
public Integer sumNullableInteger(FunctionExpression<NullableIntegerFunction1<T>> selector)
public long sumLong(FunctionExpression<LongFunction1<T>> selector)
public Long sumNullableLong(FunctionExpression<NullableLongFunction1<T>> selector)
public float sumFloat(FunctionExpression<FloatFunction1<T>> selector)
public Float sumNullableFloat(FunctionExpression<NullableFloatFunction1<T>> selector)
public Queryable<T> takeWhile(FunctionExpression<Predicate1<T>> predicate)
public Queryable<T> takeWhileN(FunctionExpression<Predicate2<T,Integer>> predicate)
public <TKey extends Comparable<TKey>> OrderedQueryable<T> thenBy(FunctionExpression<Function1<T,TKey>> keySelector)
ExtendedOrderedQueryable
thenBy
in interface ExtendedOrderedQueryable<T>
public <TKey> OrderedQueryable<T> thenBy(FunctionExpression<Function1<T,TKey>> keySelector, Comparator<TKey> comparator)
ExtendedOrderedQueryable
thenBy
in interface ExtendedOrderedQueryable<T>
public <TKey extends Comparable<TKey>> OrderedQueryable<T> thenByDescending(FunctionExpression<Function1<T,TKey>> keySelector)
ExtendedOrderedQueryable
thenByDescending
in interface ExtendedOrderedQueryable<T>
public <TKey> OrderedQueryable<T> thenByDescending(FunctionExpression<Function1<T,TKey>> keySelector, Comparator<TKey> comparator)
ExtendedOrderedQueryable
thenByDescending
in interface ExtendedOrderedQueryable<T>
public Queryable<T> where(FunctionExpression<? extends Predicate1<T>> predicate)
public Queryable<T> whereN(FunctionExpression<? extends Predicate2<T,Integer>> predicate)
public <T1,TResult> Queryable<TResult> zip(Enumerable<T1> source1, FunctionExpression<Function2<T,T1,TResult>> resultSelector)
Copyright © 2012-2014 Julian Hyde. All Rights Reserved.