public abstract class EnumerableDefaults extends Object
Enumerable
interface.Constructor and Description |
---|
EnumerableDefaults() |
Modifier and Type | Method and Description |
---|---|
static <TSource> TSource |
aggregate(Enumerable<TSource> source,
Function2<TSource,TSource,TSource> func)
Applies an accumulator function over a sequence.
|
static <TSource,TAccumulate> |
aggregate(Enumerable<TSource> source,
TAccumulate seed,
Function2<TAccumulate,TSource,TAccumulate> func)
Applies an accumulator function over a
sequence.
|
static <TSource,TAccumulate,TResult> |
aggregate(Enumerable<TSource> source,
TAccumulate seed,
Function2<TAccumulate,TSource,TAccumulate> func,
Function1<TAccumulate,TResult> selector)
Applies an accumulator function over a
sequence.
|
static <TSource> boolean |
all(Enumerable<?> enumerable,
Predicate1<TSource> predicate)
Determines whether all elements of a sequence
satisfy a condition.
|
static boolean |
any(Enumerable enumerable)
Determines whether a sequence contains any
elements.
|
static <TSource> boolean |
any(Enumerable<TSource> enumerable,
Predicate1<TSource> predicate)
Determines whether any element of a sequence
satisfies a condition.
|
static <TSource> Enumerable<TSource> |
asEnumerable(Enumerable<TSource> enumerable)
Returns the input typed as
Enumerable<TSource> . |
static <T> OrderedQueryable<T> |
asOrderedQueryable(Enumerable<T> source) |
static <TSource> Queryable<TSource> |
asQueryable(Enumerable<TSource> enumerable)
Converts an Enumerable to an IQueryable.
|
static <TSource> BigDecimal |
average(Enumerable<TSource> source,
BigDecimalFunction1<TSource> selector)
Computes the average of a sequence of Decimal
values that are obtained by invoking a transform function on
each element of the input sequence.
|
static <TSource> double |
average(Enumerable<TSource> source,
DoubleFunction1<TSource> selector)
Computes the average of a sequence of Double
values that are obtained by invoking a transform function on
each element of the input sequence.
|
static <TSource> float |
average(Enumerable<TSource> source,
FloatFunction1<TSource> selector)
Computes the average of a sequence of Float
values that are obtained by invoking a transform function on
each element of the input sequence.
|
static <TSource> int |
average(Enumerable<TSource> source,
IntegerFunction1<TSource> selector)
Computes the average of a sequence of int values
that are obtained by invoking a transform function on each
element of the input sequence.
|
static <TSource> long |
average(Enumerable<TSource> source,
LongFunction1<TSource> selector)
Computes the average of a sequence of long values
that are obtained by invoking a transform function on each
element of the input sequence.
|
static <TSource> BigDecimal |
average(Enumerable<TSource> source,
NullableBigDecimalFunction1<TSource> selector)
Computes the average of a sequence of nullable
Decimal values that are obtained by invoking a transform
function on each element of the input sequence.
|
static <TSource> Double |
average(Enumerable<TSource> source,
NullableDoubleFunction1<TSource> selector)
Computes the average of a sequence of nullable
Double values that are obtained by invoking a transform
function on each element of the input sequence.
|
static <TSource> Float |
average(Enumerable<TSource> source,
NullableFloatFunction1<TSource> selector)
Computes the average of a sequence of nullable
Float values that are obtained by invoking a transform
function on each element of the input sequence.
|
static <TSource> Integer |
average(Enumerable<TSource> source,
NullableIntegerFunction1<TSource> selector)
Computes the average of a sequence of nullable
int values that are obtained by invoking a transform function
on each element of the input sequence.
|
static <TSource> Long |
average(Enumerable<TSource> source,
NullableLongFunction1<TSource> selector)
Computes the average of a sequence of nullable
long values that are obtained by invoking a transform function
on each element of the input sequence.
|
static <TSource,T2> |
cast(Enumerable<TSource> source,
Class<T2> clazz)
Analogous to LINQ's Enumerable.Cast extension method.
|
static <TSource> Enumerable<TSource> |
concat(Enumerable<TSource> enumerable0,
Enumerable<TSource> enumerable1)
Concatenates two sequences.
|
static <TSource> boolean |
contains(Enumerable<TSource> enumerable,
TSource element)
Determines whether a sequence contains a specified
element by using the default equality comparer.
|
static <TSource> boolean |
contains(Enumerable<TSource> enumerable,
TSource element,
EqualityComparer comparer)
Determines whether a sequence contains a specified
element by using a specified
EqualityComparer<TSource> . |
static <TSource> int |
count(Enumerable<TSource> enumerable)
Returns the number of elements in a
sequence.
|
static <TSource> int |
count(Enumerable<TSource> enumerable,
Predicate1<TSource> predicate)
Returns a number that represents how many elements
in the specified sequence satisfy a condition.
|
static <TSource,TKey> |
createOrderedEnumerable(OrderedEnumerable<TSource> source,
Function1<TSource,TKey> keySelector,
Comparator<TKey> comparator,
boolean descending)
Performs a subsequent ordering of the elements in a sequence according
to a key.
|
static <TSource> Enumerable<TSource> |
defaultIfEmpty(Enumerable<TSource> enumerable)
Returns the elements of the specified sequence or
the type parameter's default value in a singleton collection if
the sequence is empty.
|
static <TSource> TSource |
defaultIfEmpty(Enumerable<TSource> enumerable,
TSource value)
Returns the elements of the specified sequence or
the specified value in a singleton collection if the sequence
is empty.
|
static <TSource> Enumerable<TSource> |
distinct(Enumerable<TSource> enumerable)
Returns distinct elements from a sequence by using
the default
EqualityComparer to compare values. |
static <TSource> Enumerable<TSource> |
distinct(Enumerable<TSource> enumerable,
EqualityComparer<TSource> comparer)
Returns distinct elements from a sequence by using
a specified
EqualityComparer to compare values. |
static <TSource> TSource |
elementAt(Enumerable<TSource> enumerable,
int index)
Returns the element at a specified index in a
sequence.
|
static <TSource> TSource |
elementAtOrDefault(Enumerable<TSource> enumerable,
int index)
Returns the element at a specified index in a
sequence or a default value if the index is out of
range.
|
static <TSource> Enumerable<TSource> |
except(Enumerable<TSource> source0,
Enumerable<TSource> source1)
Produces the set difference of two sequences by
using the default equality comparer to compare values.
|
static <TSource> Enumerable<TSource> |
except(Enumerable<TSource> source0,
Enumerable<TSource> source1,
EqualityComparer<TSource> comparer)
Produces the set difference of two sequences by
using the specified
EqualityComparer<TSource> to compare
values. |
static <TSource> TSource |
first(Enumerable<TSource> enumerable)
Returns the first element of a sequence.
|
static <TSource> TSource |
first(Enumerable<TSource> enumerable,
Predicate1<TSource> predicate)
Returns the first element in a sequence that
satisfies a specified condition.
|
static <TSource> TSource |
firstOrDefault(Enumerable<TSource> enumerable)
Returns the first element of a sequence, or a
default value if the sequence contains no elements.
|
static <TSource> TSource |
firstOrDefault(Enumerable<TSource> enumerable,
Predicate1<TSource> predicate)
Returns the first element of the sequence that
satisfies a condition or a default value if no such element is
found.
|
static <TSource,TKey> |
groupBy(Enumerable<TSource> enumerable,
Function1<TSource,TKey> keySelector)
Groups the elements of a sequence according to a
specified key selector function.
|
static <TSource,TKey> |
groupBy(Enumerable<TSource> enumerable,
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.
|
static <TSource,TKey,TAccumulate,TResult> |
groupBy(Enumerable<TSource> enumerable,
Function1<TSource,TKey> keySelector,
Function0<TAccumulate> accumulatorInitializer,
Function2<TAccumulate,TSource,TAccumulate> accumulatorAdder,
Function2<TKey,TAccumulate,TResult> resultSelector)
Groups the elements of a sequence according to a
specified key selector function, initializing an accumulator for each
group and adding to it each time an element with the same key is seen.
|
static <TSource,TKey,TAccumulate,TResult> |
groupBy(Enumerable<TSource> enumerable,
Function1<TSource,TKey> keySelector,
Function0<TAccumulate> accumulatorInitializer,
Function2<TAccumulate,TSource,TAccumulate> accumulatorAdder,
Function2<TKey,TAccumulate,TResult> resultSelector,
EqualityComparer<TKey> comparer)
Groups the elements of a sequence according to a
specified key selector function, initializing an accumulator for each
group and adding to it each time an element with the same key is seen.
|
static <TSource,TKey,TElement> |
groupBy(Enumerable<TSource> enumerable,
Function1<TSource,TKey> keySelector,
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.
|
static <TSource,TKey,TElement> |
groupBy(Enumerable<TSource> enumerable,
Function1<TSource,TKey> keySelector,
Function1<TSource,TElement> elementSelector,
EqualityComparer<TKey> comparer)
Groups the elements of a sequence according to a
key selector function.
|
static <TSource,TKey,TElement,TResult> |
groupBy(Enumerable<TSource> enumerable,
Function1<TSource,TKey> keySelector,
Function1<TSource,TElement> elementSelector,
Function2<TKey,Enumerable<TElement>,TResult> resultSelector)
Groups the elements of a sequence according to a
specified key selector function and creates a result value from
each group and its key.
|
static <TSource,TKey,TElement,TResult> |
groupBy(Enumerable<TSource> enumerable,
Function1<TSource,TKey> keySelector,
Function1<TSource,TElement> elementSelector,
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.
|
static <TSource,TKey,TResult> |
groupBy(Enumerable<TSource> enumerable,
Function1<TSource,TKey> keySelector,
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.
|
static <TSource,TKey,TResult> |
groupBy(Enumerable<TSource> enumerable,
Function1<TSource,TKey> keySelector,
Function2<TKey,Enumerable<TSource>,TResult> elementSelector,
EqualityComparer comparer)
Groups the elements of a sequence according to a
specified key selector function and creates a result value from
each group and its key.
|
static <TSource,TInner,TKey,TResult> |
groupJoin(Enumerable<TSource> outer,
Enumerable<TInner> inner,
Function1<TSource,TKey> outerKeySelector,
Function1<TInner,TKey> innerKeySelector,
Function2<TSource,Enumerable<TInner>,TResult> resultSelector)
Correlates the elements of two sequences based on
equality of keys and groups the results.
|
static <TSource,TInner,TKey,TResult> |
groupJoin(Enumerable<TSource> outer,
Enumerable<TInner> inner,
Function1<TSource,TKey> outerKeySelector,
Function1<TInner,TKey> innerKeySelector,
Function2<TSource,Enumerable<TInner>,TResult> resultSelector,
EqualityComparer<TKey> comparer)
Correlates the elements of two sequences based on
key equality and groups the results.
|
static <TSource> Enumerable<TSource> |
intersect(Enumerable<TSource> source0,
Enumerable<TSource> source1)
Produces the set intersection of two sequences by
using the default equality comparer to compare values.
|
static <TSource> Enumerable<TSource> |
intersect(Enumerable<TSource> source0,
Enumerable<TSource> source1,
EqualityComparer<TSource> comparer)
Produces the set intersection of two sequences by
using the specified
EqualityComparer<TSource> to compare
values. |
static <T,C extends Collection<? super T>> |
into(Enumerable<T> source,
C sink) |
static <TSource,TInner,TKey,TResult> |
join(Enumerable<TSource> outer,
Enumerable<TInner> inner,
Function1<TSource,TKey> outerKeySelector,
Function1<TInner,TKey> innerKeySelector,
Function2<TSource,TInner,TResult> resultSelector)
Correlates the elements of two sequences based on
matching keys.
|
static <TSource,TInner,TKey,TResult> |
join(Enumerable<TSource> outer,
Enumerable<TInner> inner,
Function1<TSource,TKey> outerKeySelector,
Function1<TInner,TKey> innerKeySelector,
Function2<TSource,TInner,TResult> resultSelector,
EqualityComparer<TKey> comparer)
Correlates the elements of two sequences based on
matching keys.
|
static <TSource,TInner,TKey,TResult> |
join(Enumerable<TSource> outer,
Enumerable<TInner> inner,
Function1<TSource,TKey> outerKeySelector,
Function1<TInner,TKey> innerKeySelector,
Function2<TSource,TInner,TResult> resultSelector,
EqualityComparer<TKey> comparer,
boolean generateNullsOnLeft,
boolean generateNullsOnRight)
Correlates the elements of two sequences based on
matching keys.
|
static <TSource> TSource |
last(Enumerable<TSource> enumerable)
Returns the last element of a sequence.
|
static <TSource> TSource |
last(Enumerable<TSource> enumerable,
Predicate1<TSource> predicate)
Returns the last element of a sequence that
satisfies a specified condition.
|
static <TSource> TSource |
lastOrDefault(Enumerable<TSource> enumerable)
Returns the last element of a sequence, or a
default value if the sequence contains no elements.
|
static <TSource> TSource |
lastOrDefault(Enumerable<TSource> enumerable,
Predicate1<TSource> predicate)
Returns the last element of a sequence that
satisfies a condition or a default value if no such element is
found.
|
static <TSource> long |
longCount(Enumerable<TSource> source)
Returns an long that represents the total number
of elements in a sequence.
|
static <TSource> long |
longCount(Enumerable<TSource> enumerable,
Predicate1<TSource> predicate)
Returns an long that represents how many elements
in a sequence satisfy a condition.
|
static <TSource extends Comparable<TSource>> |
max(Enumerable<TSource> source)
Returns the maximum value in a generic
sequence.
|
static <TSource> BigDecimal |
max(Enumerable<TSource> source,
BigDecimalFunction1<TSource> selector)
Invokes a transform function on each element of a
sequence and returns the maximum Decimal value.
|
static <TSource> double |
max(Enumerable<TSource> source,
DoubleFunction1<TSource> selector)
Invokes a transform function on each element of a
sequence and returns the maximum Double value.
|
static <TSource> float |
max(Enumerable<TSource> source,
FloatFunction1<TSource> selector)
Invokes a transform function on each element of a
sequence and returns the maximum Float value.
|
static <TSource,TResult extends Comparable<TResult>> |
max(Enumerable<TSource> source,
Function1<TSource,TResult> selector)
Invokes a transform function on each element of a
generic sequence and returns the maximum resulting
value.
|
static <TSource> int |
max(Enumerable<TSource> source,
IntegerFunction1<TSource> selector)
Invokes a transform function on each element of a
sequence and returns the maximum int value.
|
static <TSource> long |
max(Enumerable<TSource> source,
LongFunction1<TSource> selector)
Invokes a transform function on each element of a
sequence and returns the maximum long value.
|
static <TSource> BigDecimal |
max(Enumerable<TSource> source,
NullableBigDecimalFunction1<TSource> selector)
Invokes a transform function on each element of a
sequence and returns the maximum nullable Decimal
value.
|
static <TSource> Double |
max(Enumerable<TSource> source,
NullableDoubleFunction1<TSource> selector)
Invokes a transform function on each element of a
sequence and returns the maximum nullable Double
value.
|
static <TSource> Float |
max(Enumerable<TSource> source,
NullableFloatFunction1<TSource> selector)
Invokes a transform function on each element of a
sequence and returns the maximum nullable Float
value.
|
static <TSource> Integer |
max(Enumerable<TSource> source,
NullableIntegerFunction1<TSource> selector)
Invokes a transform function on each element of a
sequence and returns the maximum nullable int value.
|
static <TSource> Long |
max(Enumerable<TSource> source,
NullableLongFunction1<TSource> selector)
Invokes a transform function on each element of a
sequence and returns the maximum nullable long value.
|
static <TSource extends Comparable<TSource>> |
min(Enumerable<TSource> source)
Returns the minimum value in a generic
sequence.
|
static <TSource> BigDecimal |
min(Enumerable<TSource> source,
BigDecimalFunction1<TSource> selector)
Invokes a transform function on each element of a
sequence and returns the minimum Decimal value.
|
static <TSource> double |
min(Enumerable<TSource> source,
DoubleFunction1<TSource> selector)
Invokes a transform function on each element of a
sequence and returns the minimum Double value.
|
static <TSource> float |
min(Enumerable<TSource> source,
FloatFunction1<TSource> selector)
Invokes a transform function on each element of a
sequence and returns the minimum Float value.
|
static <TSource,TResult extends Comparable<TResult>> |
min(Enumerable<TSource> source,
Function1<TSource,TResult> selector)
Invokes a transform function on each element of a
generic sequence and returns the minimum resulting
value.
|
static <TSource> int |
min(Enumerable<TSource> source,
IntegerFunction1<TSource> selector)
Invokes a transform function on each element of a
sequence and returns the minimum int value.
|
static <TSource> long |
min(Enumerable<TSource> source,
LongFunction1<TSource> selector)
Invokes a transform function on each element of a
sequence and returns the minimum long value.
|
static <TSource> BigDecimal |
min(Enumerable<TSource> source,
NullableBigDecimalFunction1<TSource> selector)
Invokes a transform function on each element of a
sequence and returns the minimum nullable Decimal
value.
|
static <TSource> Double |
min(Enumerable<TSource> source,
NullableDoubleFunction1<TSource> selector)
Invokes a transform function on each element of a
sequence and returns the minimum nullable Double
value.
|
static <TSource> Float |
min(Enumerable<TSource> source,
NullableFloatFunction1<TSource> selector)
Invokes a transform function on each element of a
sequence and returns the minimum nullable Float
value.
|
static <TSource> Integer |
min(Enumerable<TSource> source,
NullableIntegerFunction1<TSource> selector)
Invokes a transform function on each element of a
sequence and returns the minimum nullable int value.
|
static <TSource> Long |
min(Enumerable<TSource> source,
NullableLongFunction1<TSource> selector)
Invokes a transform function on each element of a
sequence and returns the minimum nullable long value.
|
static <TSource,TResult> |
ofType(Enumerable<TSource> enumerable,
Class<TResult> clazz)
Filters the elements of an Enumerable based on a
specified type.
|
static <TSource,TKey extends Comparable> |
orderBy(Enumerable<TSource> source,
Function1<TSource,TKey> keySelector)
Sorts the elements of a sequence in ascending
order according to a key.
|
static <TSource,TKey> |
orderBy(Enumerable<TSource> source,
Function1<TSource,TKey> keySelector,
Comparator<TKey> comparator)
Sorts the elements of a sequence in ascending
order by using a specified comparer.
|
static <TSource,TKey extends Comparable> |
orderByDescending(Enumerable<TSource> source,
Function1<TSource,TKey> keySelector)
Sorts the elements of a sequence in descending
order according to a key.
|
static <TSource,TKey> |
orderByDescending(Enumerable<TSource> source,
Function1<TSource,TKey> keySelector,
Comparator<TKey> comparator)
Sorts the elements of a sequence in descending
order by using a specified comparer.
|
static <TSource> Enumerable<TSource> |
reverse(Enumerable<TSource> source)
Inverts the order of the elements in a
sequence.
|
static <TSource,TResult> |
select(Enumerable<TSource> source,
Function1<TSource,TResult> selector)
Projects each element of a sequence into a new form.
|
static <TSource,TResult> |
select(Enumerable<TSource> source,
Function2<TSource,Integer,TResult> selector)
Projects each element of a sequence into a new
form by incorporating the element's index.
|
static <TSource,TCollection,TResult> |
selectMany(Enumerable<TSource> source,
Function1<TSource,Enumerable<TCollection>> collectionSelector,
Function2<TSource,TCollection,TResult> resultSelector)
Projects each element of a sequence to an
Enumerable<TSource> , flattens the resulting sequences into one
sequence, and invokes a result selector function on each
element therein. |
static <TSource,TResult> |
selectMany(Enumerable<TSource> source,
Function1<TSource,Enumerable<TResult>> selector)
Projects each element of a sequence to an
Enumerable<TSource> and flattens the resulting sequences into one
sequence. |
static <TSource,TCollection,TResult> |
selectMany(Enumerable<TSource> source,
Function2<TSource,Integer,Enumerable<TCollection>> collectionSelector,
Function2<TSource,TCollection,TResult> resultSelector)
Projects each element of a sequence to an
Enumerable<TSource> , flattens the resulting sequences into one
sequence, and invokes a result selector function on each
element therein. |
static <TSource,TResult> |
selectMany(Enumerable<TSource> source,
Function2<TSource,Integer,Enumerable<TResult>> selector)
Projects each element of a sequence to an
Enumerable<TSource> , and flattens the resulting sequences into one
sequence. |
static <TSource> boolean |
sequenceEqual(Enumerable<TSource> enumerable0,
Enumerable<TSource> enumerable1)
Determines whether two sequences are equal by
comparing the elements by using the default equality comparer
for their type.
|
static <TSource> boolean |
sequenceEqual(Enumerable<TSource> enumerable0,
Enumerable<TSource> enumerable1,
EqualityComparer<TSource> comparer)
Determines whether two sequences are equal by
comparing their elements by using a specified
EqualityComparer<TSource> . |
static <TSource> TSource |
single(Enumerable<TSource> source)
Returns the only element of a sequence, and throws
an exception if there is not exactly one element in the
sequence.
|
static <TSource> TSource |
single(Enumerable<TSource> source,
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.
|
static <TSource> TSource |
singleOrDefault(Enumerable<TSource> source)
Returns the only element of a sequence, or a
default value if the sequence is empty; this method throws an
exception if there is more than one element in the
sequence.
|
static <TSource> TSource |
singleOrDefault(Enumerable<TSource> source,
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.
|
static <TSource> Enumerable<TSource> |
skip(Enumerable<TSource> source,
int count)
Bypasses a specified number of elements in a
sequence and then returns the remaining elements.
|
static <TSource> Enumerable<TSource> |
skipWhile(Enumerable<TSource> source,
Predicate1<TSource> predicate)
Bypasses elements in a sequence as long as a
specified condition is true and then returns the remaining
elements.
|
static <TSource> Enumerable<TSource> |
skipWhile(Enumerable<TSource> source,
Predicate2<TSource,Integer> predicate)
Bypasses elements in a sequence as long as a
specified condition is true and then returns the remaining
elements.
|
static <TSource> BigDecimal |
sum(Enumerable<TSource> source,
BigDecimalFunction1<TSource> selector)
Computes the sum of the sequence of Decimal values
that are obtained by invoking a transform function on each
element of the input sequence.
|
static <TSource> double |
sum(Enumerable<TSource> source,
DoubleFunction1<TSource> selector)
Computes the sum of the sequence of Double values
that are obtained by invoking a transform function on each
element of the input sequence.
|
static <TSource> float |
sum(Enumerable<TSource> source,
FloatFunction1<TSource> selector)
Computes the sum of the sequence of Float values
that are obtained by invoking a transform function on each
element of the input sequence.
|
static <TSource> int |
sum(Enumerable<TSource> source,
IntegerFunction1<TSource> selector)
Computes the sum of the sequence of int values
that are obtained by invoking a transform function on each
element of the input sequence.
|
static <TSource> long |
sum(Enumerable<TSource> source,
LongFunction1<TSource> selector)
Computes the sum of the sequence of long values
that are obtained by invoking a transform function on each
element of the input sequence.
|
static <TSource> BigDecimal |
sum(Enumerable<TSource> source,
NullableBigDecimalFunction1<TSource> selector)
Computes the sum of the sequence of nullable
Decimal values that are obtained by invoking a transform
function on each element of the input sequence.
|
static <TSource> Double |
sum(Enumerable<TSource> source,
NullableDoubleFunction1<TSource> selector)
Computes the sum of the sequence of nullable
Double values that are obtained by invoking a transform
function on each element of the input sequence.
|
static <TSource> Float |
sum(Enumerable<TSource> source,
NullableFloatFunction1<TSource> selector)
Computes the sum of the sequence of nullable
Float values that are obtained by invoking a transform
function on each element of the input sequence.
|
static <TSource> Integer |
sum(Enumerable<TSource> source,
NullableIntegerFunction1<TSource> selector)
Computes the sum of the sequence of nullable int
values that are obtained by invoking a transform function on
each element of the input sequence.
|
static <TSource> Long |
sum(Enumerable<TSource> source,
NullableLongFunction1<TSource> selector)
Computes the sum of the sequence of nullable long
values that are obtained by invoking a transform function on
each element of the input sequence.
|
static <TSource> Enumerable<TSource> |
take(Enumerable<TSource> source,
int count)
Returns a specified number of contiguous elements
from the start of a sequence.
|
static <TSource> Enumerable<TSource> |
takeWhile(Enumerable<TSource> source,
Predicate1<TSource> predicate)
Returns elements from a sequence as long as a
specified condition is true.
|
static <TSource> Enumerable<TSource> |
takeWhile(Enumerable<TSource> source,
Predicate2<TSource,Integer> predicate)
Returns elements from a sequence as long as a
specified condition is true.
|
static <TSource,TKey extends Comparable<TKey>> |
thenBy(OrderedEnumerable<TSource> source,
Function1<TSource,TKey> keySelector)
Performs a subsequent ordering of the elements in a sequence in
ascending order according to a key.
|
static <TSource,TKey> |
thenBy(OrderedEnumerable<TSource> source,
Function1<TSource,TKey> keySelector,
Comparator<TKey> comparator)
Performs a subsequent ordering of the elements in a sequence in
ascending order according to a key, using a specified comparator.
|
static <TSource,TKey extends Comparable<TKey>> |
thenByDescending(OrderedEnumerable<TSource> source,
Function1<TSource,TKey> keySelector)
Performs a subsequent ordering of the elements in a sequence in
descending order according to a key.
|
static <TSource,TKey> |
thenByDescending(OrderedEnumerable<TSource> source,
Function1<TSource,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.
|
static <TSource> List<TSource> |
toList(Enumerable<TSource> source)
Creates a
List<TSource> from an Enumerable<TSource> . |
static <TSource,TKey> |
toLookup(Enumerable<TSource> source,
Function1<TSource,TKey> keySelector)
Creates a Lookup<TKey, TElement> from an
Enumerable<TSource> according to a specified key selector
function.
|
static <TSource,TKey> |
toLookup(Enumerable<TSource> source,
Function1<TSource,TKey> keySelector,
EqualityComparer<TKey> comparer)
Creates a
Lookup<TKey, TElement> from an
Enumerable<TSource> according to a specified key selector function
and key comparer. |
static <TSource,TKey,TElement> |
toLookup(Enumerable<TSource> source,
Function1<TSource,TKey> keySelector,
Function1<TSource,TElement> elementSelector)
Creates a
Lookup<TKey, TElement> from an
Enumerable<TSource> according to specified key selector and element
selector functions. |
static <TSource,TKey,TElement> |
toLookup(Enumerable<TSource> source,
Function1<TSource,TKey> keySelector,
Function1<TSource,TElement> elementSelector,
EqualityComparer<TKey> comparer)
Creates a
Lookup<TKey, TElement> from an
Enumerable<TSource> according to a specified key selector function,
a comparer and an element selector function. |
static <TSource,TKey> |
toMap(Enumerable<TSource> source,
Function1<TSource,TKey> keySelector)
Creates a Map<TKey, TValue> from an
Enumerable<TSource> according to a specified key selector
function.
|
static <TSource,TKey> |
toMap(Enumerable<TSource> source,
Function1<TSource,TKey> keySelector,
EqualityComparer<TKey> comparer)
Creates a
Map<TKey, TValue> from an
Enumerable<TSource> according to a specified key selector function
and key comparer. |
static <TSource,TKey,TElement> |
toMap(Enumerable<TSource> source,
Function1<TSource,TKey> keySelector,
Function1<TSource,TElement> elementSelector)
Creates a
Map<TKey, TValue> from an
Enumerable<TSource> according to specified key selector and element
selector functions. |
static <TSource,TKey,TElement> |
toMap(Enumerable<TSource> source,
Function1<TSource,TKey> keySelector,
Function1<TSource,TElement> elementSelector,
EqualityComparer<TKey> comparer)
Creates a
Map<TKey, TValue> from an
Enumerable<TSource> according to a specified key selector function,
a comparer, and an element selector function. |
static <TSource> Enumerable<TSource> |
union(Enumerable<TSource> source0,
Enumerable<TSource> source1)
Produces the set union of two sequences by using
the default equality comparer.
|
static <TSource> Enumerable<TSource> |
union(Enumerable<TSource> source0,
Enumerable<TSource> source1,
EqualityComparer<TSource> comparer)
Produces the set union of two sequences by using a
specified EqualityComparer<TSource>.
|
static <TSource> Enumerable<TSource> |
where(Enumerable<TSource> source,
Predicate1<TSource> predicate)
Filters a sequence of values based on a
predicate.
|
static <TSource> Enumerable<TSource> |
where(Enumerable<TSource> source,
Predicate2<TSource,Integer> predicate)
Filters a sequence of values based on a
predicate.
|
static <T0,T1,TResult> |
zip(Enumerable<T0> source0,
Enumerable<T1> source1,
Function2<T0,T1,TResult> resultSelector)
Applies a specified function to the corresponding
elements of two sequences, producing a sequence of the
results.
|
public static <TSource> TSource aggregate(Enumerable<TSource> source, Function2<TSource,TSource,TSource> func)
public static <TSource,TAccumulate> TAccumulate aggregate(Enumerable<TSource> source, TAccumulate seed, Function2<TAccumulate,TSource,TAccumulate> func)
public static <TSource,TAccumulate,TResult> TResult aggregate(Enumerable<TSource> source, TAccumulate seed, Function2<TAccumulate,TSource,TAccumulate> func, Function1<TAccumulate,TResult> selector)
public static <TSource> boolean all(Enumerable<?> enumerable, Predicate1<TSource> predicate)
public static boolean any(Enumerable enumerable)
public static <TSource> boolean any(Enumerable<TSource> enumerable, Predicate1<TSource> predicate)
public static <TSource> Enumerable<TSource> asEnumerable(Enumerable<TSource> enumerable)
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.
public static <TSource> Queryable<TSource> asQueryable(Enumerable<TSource> enumerable)
Analogous to the LINQ's Enumerable.AsQueryable extension method.
TSource
- Element typeenumerable
- Enumerablepublic static <TSource> BigDecimal average(Enumerable<TSource> source, BigDecimalFunction1<TSource> selector)
public static <TSource> BigDecimal average(Enumerable<TSource> source, NullableBigDecimalFunction1<TSource> selector)
public static <TSource> double average(Enumerable<TSource> source, DoubleFunction1<TSource> selector)
public static <TSource> Double average(Enumerable<TSource> source, NullableDoubleFunction1<TSource> selector)
public static <TSource> int average(Enumerable<TSource> source, IntegerFunction1<TSource> selector)
public static <TSource> Integer average(Enumerable<TSource> source, NullableIntegerFunction1<TSource> selector)
public static <TSource> long average(Enumerable<TSource> source, LongFunction1<TSource> selector)
public static <TSource> Long average(Enumerable<TSource> source, NullableLongFunction1<TSource> selector)
public static <TSource> float average(Enumerable<TSource> source, FloatFunction1<TSource> selector)
public static <TSource> Float average(Enumerable<TSource> source, NullableFloatFunction1<TSource> selector)
public static <TSource,T2> Enumerable<T2> cast(Enumerable<TSource> source, Class<T2> clazz)
Analogous to LINQ's Enumerable.Cast extension method.
T2
- Target typeclazz
- Target typepublic static <TSource> Enumerable<TSource> concat(Enumerable<TSource> enumerable0, Enumerable<TSource> enumerable1)
public static <TSource> boolean contains(Enumerable<TSource> enumerable, TSource element)
public static <TSource> boolean contains(Enumerable<TSource> enumerable, TSource element, EqualityComparer comparer)
EqualityComparer<TSource>
.public static <TSource> int count(Enumerable<TSource> enumerable)
public static <TSource> int count(Enumerable<TSource> enumerable, Predicate1<TSource> predicate)
public static <TSource> Enumerable<TSource> defaultIfEmpty(Enumerable<TSource> enumerable)
public static <TSource> TSource defaultIfEmpty(Enumerable<TSource> enumerable, TSource value)
public static <TSource> Enumerable<TSource> distinct(Enumerable<TSource> enumerable)
EqualityComparer
to compare values.public static <TSource> Enumerable<TSource> distinct(Enumerable<TSource> enumerable, EqualityComparer<TSource> comparer)
EqualityComparer
to compare values.public static <TSource> TSource elementAt(Enumerable<TSource> enumerable, int index)
public static <TSource> TSource elementAtOrDefault(Enumerable<TSource> enumerable, int index)
public static <TSource> Enumerable<TSource> except(Enumerable<TSource> source0, Enumerable<TSource> source1)
public static <TSource> Enumerable<TSource> except(Enumerable<TSource> source0, Enumerable<TSource> source1, EqualityComparer<TSource> comparer)
EqualityComparer<TSource>
to compare
values.public static <TSource> TSource first(Enumerable<TSource> enumerable)
public static <TSource> TSource first(Enumerable<TSource> enumerable, Predicate1<TSource> predicate)
public static <TSource> TSource firstOrDefault(Enumerable<TSource> enumerable)
public static <TSource> TSource firstOrDefault(Enumerable<TSource> enumerable, Predicate1<TSource> predicate)
public static <TSource,TKey> Enumerable<Grouping<TKey,TSource>> groupBy(Enumerable<TSource> enumerable, Function1<TSource,TKey> keySelector)
public static <TSource,TKey> Enumerable<Grouping<TKey,TSource>> groupBy(Enumerable<TSource> enumerable, Function1<TSource,TKey> keySelector, EqualityComparer<TKey> comparer)
public static <TSource,TKey,TElement> Enumerable<Grouping<TKey,TElement>> groupBy(Enumerable<TSource> enumerable, Function1<TSource,TKey> keySelector, Function1<TSource,TElement> elementSelector)
public static <TSource,TKey,TResult> Enumerable<Grouping<TKey,TResult>> groupBy(Enumerable<TSource> enumerable, Function1<TSource,TKey> keySelector, Function2<TKey,Enumerable<TSource>,TResult> elementSelector)
public static <TSource,TKey,TElement> Enumerable<Grouping<TKey,TElement>> groupBy(Enumerable<TSource> enumerable, Function1<TSource,TKey> keySelector, Function1<TSource,TElement> elementSelector, EqualityComparer<TKey> comparer)
public static <TSource,TKey,TResult> Enumerable<TResult> groupBy(Enumerable<TSource> enumerable, Function1<TSource,TKey> keySelector, Function2<TKey,Enumerable<TSource>,TResult> elementSelector, EqualityComparer comparer)
public static <TSource,TKey,TElement,TResult> Enumerable<TResult> groupBy(Enumerable<TSource> enumerable, Function1<TSource,TKey> keySelector, Function1<TSource,TElement> elementSelector, Function2<TKey,Enumerable<TElement>,TResult> resultSelector)
public static <TSource,TKey,TElement,TResult> Enumerable<TResult> groupBy(Enumerable<TSource> enumerable, Function1<TSource,TKey> keySelector, Function1<TSource,TElement> elementSelector, Function2<TKey,Enumerable<TElement>,TResult> resultSelector, EqualityComparer<TKey> comparer)
public static <TSource,TKey,TAccumulate,TResult> Enumerable<TResult> groupBy(Enumerable<TSource> enumerable, Function1<TSource,TKey> keySelector, Function0<TAccumulate> accumulatorInitializer, Function2<TAccumulate,TSource,TAccumulate> accumulatorAdder, Function2<TKey,TAccumulate,TResult> resultSelector)
public static <TSource,TKey,TAccumulate,TResult> Enumerable<TResult> groupBy(Enumerable<TSource> enumerable, Function1<TSource,TKey> keySelector, Function0<TAccumulate> accumulatorInitializer, Function2<TAccumulate,TSource,TAccumulate> accumulatorAdder, Function2<TKey,TAccumulate,TResult> resultSelector, EqualityComparer<TKey> comparer)
public static <TSource,TInner,TKey,TResult> Enumerable<TResult> groupJoin(Enumerable<TSource> outer, Enumerable<TInner> inner, Function1<TSource,TKey> outerKeySelector, Function1<TInner,TKey> innerKeySelector, Function2<TSource,Enumerable<TInner>,TResult> resultSelector)
public static <TSource,TInner,TKey,TResult> Enumerable<TResult> groupJoin(Enumerable<TSource> outer, Enumerable<TInner> inner, Function1<TSource,TKey> outerKeySelector, Function1<TInner,TKey> innerKeySelector, Function2<TSource,Enumerable<TInner>,TResult> resultSelector, EqualityComparer<TKey> comparer)
EqualityComparer<TSource>
is used to compare keys.public static <TSource> Enumerable<TSource> intersect(Enumerable<TSource> source0, Enumerable<TSource> source1)
public static <TSource> Enumerable<TSource> intersect(Enumerable<TSource> source0, Enumerable<TSource> source1, EqualityComparer<TSource> comparer)
EqualityComparer<TSource>
to compare
values.public static <TSource,TInner,TKey,TResult> Enumerable<TResult> join(Enumerable<TSource> outer, Enumerable<TInner> inner, Function1<TSource,TKey> outerKeySelector, Function1<TInner,TKey> innerKeySelector, Function2<TSource,TInner,TResult> resultSelector)
public static <TSource,TInner,TKey,TResult> Enumerable<TResult> join(Enumerable<TSource> outer, Enumerable<TInner> inner, Function1<TSource,TKey> outerKeySelector, Function1<TInner,TKey> innerKeySelector, Function2<TSource,TInner,TResult> resultSelector, EqualityComparer<TKey> comparer)
EqualityComparer<TSource>
is used to
compare keys.public static <TSource,TInner,TKey,TResult> Enumerable<TResult> join(Enumerable<TSource> outer, Enumerable<TInner> inner, Function1<TSource,TKey> outerKeySelector, Function1<TInner,TKey> innerKeySelector, Function2<TSource,TInner,TResult> resultSelector, EqualityComparer<TKey> comparer, boolean generateNullsOnLeft, boolean generateNullsOnRight)
EqualityComparer<TSource>
is used to
compare keys.public static <TSource> TSource last(Enumerable<TSource> enumerable)
public static <TSource> TSource last(Enumerable<TSource> enumerable, Predicate1<TSource> predicate)
public static <TSource> TSource lastOrDefault(Enumerable<TSource> enumerable)
public static <TSource> TSource lastOrDefault(Enumerable<TSource> enumerable, Predicate1<TSource> predicate)
public static <TSource> long longCount(Enumerable<TSource> source)
public static <TSource> long longCount(Enumerable<TSource> enumerable, Predicate1<TSource> predicate)
public static <TSource extends Comparable<TSource>> TSource max(Enumerable<TSource> source)
public static <TSource> BigDecimal max(Enumerable<TSource> source, BigDecimalFunction1<TSource> selector)
public static <TSource> BigDecimal max(Enumerable<TSource> source, NullableBigDecimalFunction1<TSource> selector)
public static <TSource> double max(Enumerable<TSource> source, DoubleFunction1<TSource> selector)
public static <TSource> Double max(Enumerable<TSource> source, NullableDoubleFunction1<TSource> selector)
public static <TSource> int max(Enumerable<TSource> source, IntegerFunction1<TSource> selector)
public static <TSource> Integer max(Enumerable<TSource> source, NullableIntegerFunction1<TSource> selector)
public static <TSource> long max(Enumerable<TSource> source, LongFunction1<TSource> selector)
public static <TSource> Long max(Enumerable<TSource> source, NullableLongFunction1<TSource> selector)
public static <TSource> float max(Enumerable<TSource> source, FloatFunction1<TSource> selector)
public static <TSource> Float max(Enumerable<TSource> source, NullableFloatFunction1<TSource> selector)
public static <TSource,TResult extends Comparable<TResult>> TResult max(Enumerable<TSource> source, Function1<TSource,TResult> selector)
public static <TSource extends Comparable<TSource>> TSource min(Enumerable<TSource> source)
public static <TSource> BigDecimal min(Enumerable<TSource> source, BigDecimalFunction1<TSource> selector)
public static <TSource> BigDecimal min(Enumerable<TSource> source, NullableBigDecimalFunction1<TSource> selector)
public static <TSource> double min(Enumerable<TSource> source, DoubleFunction1<TSource> selector)
public static <TSource> Double min(Enumerable<TSource> source, NullableDoubleFunction1<TSource> selector)
public static <TSource> int min(Enumerable<TSource> source, IntegerFunction1<TSource> selector)
public static <TSource> Integer min(Enumerable<TSource> source, NullableIntegerFunction1<TSource> selector)
public static <TSource> long min(Enumerable<TSource> source, LongFunction1<TSource> selector)
public static <TSource> Long min(Enumerable<TSource> source, NullableLongFunction1<TSource> selector)
public static <TSource> float min(Enumerable<TSource> source, FloatFunction1<TSource> selector)
public static <TSource> Float min(Enumerable<TSource> source, NullableFloatFunction1<TSource> selector)
public static <TSource,TResult extends Comparable<TResult>> TResult min(Enumerable<TSource> source, Function1<TSource,TResult> selector)
public static <TSource,TResult> Enumerable<TResult> ofType(Enumerable<TSource> enumerable, Class<TResult> clazz)
Analogous to LINQ's Enumerable.OfType extension method.
TResult
- Target typeclazz
- Target typepublic static <TSource,TKey extends Comparable> Enumerable<TSource> orderBy(Enumerable<TSource> source, Function1<TSource,TKey> keySelector)
public static <TSource,TKey> Enumerable<TSource> orderBy(Enumerable<TSource> source, Function1<TSource,TKey> keySelector, Comparator<TKey> comparator)
public static <TSource,TKey extends Comparable> Enumerable<TSource> orderByDescending(Enumerable<TSource> source, Function1<TSource,TKey> keySelector)
public static <TSource,TKey> Enumerable<TSource> orderByDescending(Enumerable<TSource> source, Function1<TSource,TKey> keySelector, Comparator<TKey> comparator)
public static <TSource> Enumerable<TSource> reverse(Enumerable<TSource> source)
public static <TSource,TResult> Enumerable<TResult> select(Enumerable<TSource> source, Function1<TSource,TResult> selector)
public static <TSource,TResult> Enumerable<TResult> select(Enumerable<TSource> source, Function2<TSource,Integer,TResult> selector)
public static <TSource,TResult> Enumerable<TResult> selectMany(Enumerable<TSource> source, Function1<TSource,Enumerable<TResult>> selector)
Enumerable<TSource>
and flattens the resulting sequences into one
sequence.public static <TSource,TResult> Enumerable<TResult> selectMany(Enumerable<TSource> source, Function2<TSource,Integer,Enumerable<TResult>> selector)
Enumerable<TSource>
, and flattens the resulting sequences into one
sequence. The index of each source element is used in the
projected form of that element.public static <TSource,TCollection,TResult> Enumerable<TResult> selectMany(Enumerable<TSource> source, Function2<TSource,Integer,Enumerable<TCollection>> collectionSelector, Function2<TSource,TCollection,TResult> resultSelector)
Enumerable<TSource>
, flattens the resulting sequences into one
sequence, and invokes a result selector function on each
element therein. The index of each source element is used in
the intermediate projected form of that element.public static <TSource,TCollection,TResult> Enumerable<TResult> selectMany(Enumerable<TSource> source, Function1<TSource,Enumerable<TCollection>> collectionSelector, Function2<TSource,TCollection,TResult> resultSelector)
Enumerable<TSource>
, flattens the resulting sequences into one
sequence, and invokes a result selector function on each
element therein.public static <TSource> boolean sequenceEqual(Enumerable<TSource> enumerable0, Enumerable<TSource> enumerable1)
public static <TSource> boolean sequenceEqual(Enumerable<TSource> enumerable0, Enumerable<TSource> enumerable1, EqualityComparer<TSource> comparer)
EqualityComparer<TSource>
.public static <TSource> TSource single(Enumerable<TSource> source)
public static <TSource> TSource single(Enumerable<TSource> source, Predicate1<TSource> predicate)
public static <TSource> TSource singleOrDefault(Enumerable<TSource> source)
public static <TSource> TSource singleOrDefault(Enumerable<TSource> source, Predicate1<TSource> predicate)
public static <TSource> Enumerable<TSource> skip(Enumerable<TSource> source, int count)
public static <TSource> Enumerable<TSource> skipWhile(Enumerable<TSource> source, Predicate1<TSource> predicate)
public static <TSource> Enumerable<TSource> skipWhile(Enumerable<TSource> source, Predicate2<TSource,Integer> predicate)
public static <TSource> BigDecimal sum(Enumerable<TSource> source, BigDecimalFunction1<TSource> selector)
public static <TSource> BigDecimal sum(Enumerable<TSource> source, NullableBigDecimalFunction1<TSource> selector)
public static <TSource> double sum(Enumerable<TSource> source, DoubleFunction1<TSource> selector)
public static <TSource> Double sum(Enumerable<TSource> source, NullableDoubleFunction1<TSource> selector)
public static <TSource> int sum(Enumerable<TSource> source, IntegerFunction1<TSource> selector)
public static <TSource> Integer sum(Enumerable<TSource> source, NullableIntegerFunction1<TSource> selector)
public static <TSource> long sum(Enumerable<TSource> source, LongFunction1<TSource> selector)
public static <TSource> Long sum(Enumerable<TSource> source, NullableLongFunction1<TSource> selector)
public static <TSource> float sum(Enumerable<TSource> source, FloatFunction1<TSource> selector)
public static <TSource> Float sum(Enumerable<TSource> source, NullableFloatFunction1<TSource> selector)
public static <TSource> Enumerable<TSource> take(Enumerable<TSource> source, int count)
public static <TSource> Enumerable<TSource> takeWhile(Enumerable<TSource> source, Predicate1<TSource> predicate)
public static <TSource> Enumerable<TSource> takeWhile(Enumerable<TSource> source, Predicate2<TSource,Integer> predicate)
public static <TSource,TKey> OrderedEnumerable<TSource> createOrderedEnumerable(OrderedEnumerable<TSource> source, Function1<TSource,TKey> keySelector, Comparator<TKey> comparator, boolean descending)
public static <TSource,TKey extends Comparable<TKey>> OrderedEnumerable<TSource> thenBy(OrderedEnumerable<TSource> source, Function1<TSource,TKey> keySelector)
public static <TSource,TKey> OrderedEnumerable<TSource> thenBy(OrderedEnumerable<TSource> source, Function1<TSource,TKey> keySelector, Comparator<TKey> comparator)
public static <TSource,TKey extends Comparable<TKey>> OrderedEnumerable<TSource> thenByDescending(OrderedEnumerable<TSource> source, Function1<TSource,TKey> keySelector)
public static <TSource,TKey> OrderedEnumerable<TSource> thenByDescending(OrderedEnumerable<TSource> source, Function1<TSource,TKey> keySelector, Comparator<TKey> comparator)
public static <TSource,TKey> Map<TKey,TSource> toMap(Enumerable<TSource> source, Function1<TSource,TKey> keySelector)
NOTE: Called toDictionary
in LINQ.NET.
public static <TSource,TKey> Map<TKey,TSource> toMap(Enumerable<TSource> source, Function1<TSource,TKey> keySelector, EqualityComparer<TKey> comparer)
Map<TKey, TValue>
from an
Enumerable<TSource>
according to a specified key selector function
and key comparer.public static <TSource,TKey,TElement> Map<TKey,TElement> toMap(Enumerable<TSource> source, Function1<TSource,TKey> keySelector, Function1<TSource,TElement> elementSelector)
Map<TKey, TValue>
from an
Enumerable<TSource>
according to specified key selector and element
selector functions.public static <TSource,TKey,TElement> Map<TKey,TElement> toMap(Enumerable<TSource> source, Function1<TSource,TKey> keySelector, Function1<TSource,TElement> elementSelector, EqualityComparer<TKey> comparer)
Map<TKey, TValue>
from an
Enumerable<TSource>
according to a specified key selector function,
a comparer, and an element selector function.public static <TSource> List<TSource> toList(Enumerable<TSource> source)
List<TSource>
from an Enumerable<TSource>
.public static <TSource,TKey> Lookup<TKey,TSource> toLookup(Enumerable<TSource> source, Function1<TSource,TKey> keySelector)
public static <TSource,TKey> Lookup<TKey,TSource> toLookup(Enumerable<TSource> source, Function1<TSource,TKey> keySelector, EqualityComparer<TKey> comparer)
Lookup<TKey, TElement>
from an
Enumerable<TSource>
according to a specified key selector function
and key comparer.public static <TSource,TKey,TElement> Lookup<TKey,TElement> toLookup(Enumerable<TSource> source, Function1<TSource,TKey> keySelector, Function1<TSource,TElement> elementSelector)
Lookup<TKey, TElement>
from an
Enumerable<TSource>
according to specified key selector and element
selector functions.public static <TSource,TKey,TElement> Lookup<TKey,TElement> toLookup(Enumerable<TSource> source, Function1<TSource,TKey> keySelector, Function1<TSource,TElement> elementSelector, EqualityComparer<TKey> comparer)
Lookup<TKey, TElement>
from an
Enumerable<TSource>
according to a specified key selector function,
a comparer and an element selector function.public static <TSource> Enumerable<TSource> union(Enumerable<TSource> source0, Enumerable<TSource> source1)
public static <TSource> Enumerable<TSource> union(Enumerable<TSource> source0, Enumerable<TSource> source1, EqualityComparer<TSource> comparer)
public static <TSource> Enumerable<TSource> where(Enumerable<TSource> source, Predicate1<TSource> predicate)
public static <TSource> Enumerable<TSource> where(Enumerable<TSource> source, Predicate2<TSource,Integer> predicate)
public static <T0,T1,TResult> Enumerable<TResult> zip(Enumerable<T0> source0, Enumerable<T1> source1, Function2<T0,T1,TResult> resultSelector)
public static <T> OrderedQueryable<T> asOrderedQueryable(Enumerable<T> source)
public static <T,C extends Collection<? super T>> C into(Enumerable<T> source, C sink)
Copyright © 2012-2014 Julian Hyde. All Rights Reserved.