INNER CODE UNIT · Java
sum
SeaseLtd/rated-ranking-evaluator · rre-core/src/main/java/io/sease/rre/Calculator.java:38
public static BigDecimal sum(final BigDecimal... addends) {
return stream(addends).reduce(BigDecimal.ZERO, BigDecimal::add);
}
/**
* Returns the product of a numbers set.
*
* @param numbers the numbers that will be added together.
* @return the product of all input numbers.
*/
public static BigDecimal multiply(final BigDecimal... numbers) {
return stream(numbers).reduce(BigDecimal.ONE, BigDecimal::multiply);
}
/**
* Executes a subtraction between the two numbers.
*
* @param minuend the minuend.