/** * Invokes a transform function on each element of a * sequence and returns the maximum nullable long value. (Defined * by Enumerable.) */ public static <TSource> Long max(Enumerable<TSource> source, NullableLongFunction1<TSource> selector) { return aggregate(source.select(selector), null, Extensions.LONG_MAX); }
/** * 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. */ public static <TSource> Float sum(Enumerable<TSource> source, NullableFloatFunction1<TSource> selector) { return aggregate(source.select(selector), 0F, Extensions.FLOAT_SUM); }
public <TAccumulate, TResult> TResult aggregate(TAccumulate seed, Function2<TAccumulate, T, TAccumulate> func, Function1<TAccumulate, TResult> selector) { return EnumerableDefaults.aggregate(getThis(), seed, func, selector); }
/** * Returns the minimum value in a generic * sequence. */ public static <TSource extends Comparable<TSource>> TSource min( Enumerable<TSource> source) { Function2<TSource, TSource, TSource> min = minFunction(); return aggregate(source, null, min); }
public <TAccumulate, TResult> TResult aggregate(TAccumulate seed, Function2<TAccumulate, T, TAccumulate> func, Function1<TAccumulate, TResult> selector) { return EnumerableDefaults.aggregate(getThis(), seed, func, selector); } }
/** * Invokes a transform function on each element of a * sequence and returns the minimum nullable Double * value. */ public static <TSource> Double min(Enumerable<TSource> source, NullableDoubleFunction1<TSource> selector) { return aggregate(source.select(selector), null, Extensions.DOUBLE_MIN); }
/** * 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. */ public static <TSource> BigDecimal sum(Enumerable<TSource> source, NullableBigDecimalFunction1<TSource> selector) { return aggregate(source.select(selector), BigDecimal.ZERO, Extensions.BIG_DECIMAL_SUM); }
/** * 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. */ public static <TSource> Double sum(Enumerable<TSource> source, NullableDoubleFunction1<TSource> selector) { return aggregate(source.select(selector), 0d, Extensions.DOUBLE_SUM); }
/** * Invokes a transform function on each element of a * sequence and returns the maximum Float value. */ public static <TSource> float max(Enumerable<TSource> source, FloatFunction1<TSource> selector) { return aggregate(source.select(adapt(selector)), null, Extensions.FLOAT_MAX); }
/** * Computes the sum of the sequence of int values * that are obtained by invoking a transform function on each * element of the input sequence. */ public static <TSource> int sum(Enumerable<TSource> source, IntegerFunction1<TSource> selector) { return aggregate(source.select(adapt(selector)), 0, Extensions.INTEGER_SUM); }
/** * Computes the sum of the sequence of long values * that are obtained by invoking a transform function on each * element of the input sequence. */ public static <TSource> long sum(Enumerable<TSource> source, LongFunction1<TSource> selector) { return aggregate(source.select(adapt(selector)), 0L, Extensions.LONG_SUM); }
public <TAccumulate> TAccumulate aggregate(TAccumulate seed, FunctionExpression<Function2<TAccumulate, T, TAccumulate>> selector) { return EnumerableDefaults.aggregate(getThis(), seed, selector.getFunction()); }
/** * Invokes a transform function on each element of a * sequence and returns the minimum nullable Decimal * value. */ public static <TSource> BigDecimal min(Enumerable<TSource> source, NullableBigDecimalFunction1<TSource> selector) { Function2<BigDecimal, BigDecimal, BigDecimal> min = minFunction(); return aggregate(source.select(selector), null, min); }
/** * Invokes a transform function on each element of a * sequence and returns the minimum Double value. */ public static <TSource> double min(Enumerable<TSource> source, DoubleFunction1<TSource> selector) { return aggregate(source.select(adapt(selector)), null, Extensions.DOUBLE_MIN); }
/** * Invokes a transform function on each element of a * sequence and returns the maximum Double value. */ public static <TSource> double max(Enumerable<TSource> source, DoubleFunction1<TSource> selector) { return aggregate(source.select(adapt(selector)), null, Extensions.DOUBLE_MAX); }
/** * Invokes a transform function on each element of a * generic sequence and returns the maximum resulting * value. */ public static <TSource, TResult extends Comparable<TResult>> TResult max( Enumerable<TSource> source, Function1<TSource, TResult> selector) { Function2<TResult, TResult, TResult> max = maxFunction(); return aggregate(source.select(selector), null, max); }
/** * Invokes a transform function on each element of a * sequence and returns the minimum int value. */ public static <TSource> int min(Enumerable<TSource> source, IntegerFunction1<TSource> selector) { return aggregate(source.select(adapt(selector)), null, Extensions.INTEGER_MIN); }
/** * Invokes a transform function on each element of a * generic sequence and returns the minimum resulting * value. */ public static <TSource, TResult extends Comparable<TResult>> TResult min( Enumerable<TSource> source, Function1<TSource, TResult> selector) { Function2<TResult, TResult, TResult> min = minFunction(); return aggregate(source.select(selector), null, min); }
/** * Computes the sum of the sequence of Double values * that are obtained by invoking a transform function on each * element of the input sequence. */ public static <TSource> double sum(Enumerable<TSource> source, DoubleFunction1<TSource> selector) { return aggregate(source.select(adapt(selector)), 0d, Extensions.DOUBLE_SUM); }
/** * Computes the sum of the sequence of Float values * that are obtained by invoking a transform function on each * element of the input sequence. */ public static <TSource> float sum(Enumerable<TSource> source, FloatFunction1<TSource> selector) { return aggregate(source.select(adapt(selector)), 0F, Extensions.FLOAT_SUM); }