@Test public void shouldReturnAnAccumulatorThatMultipliesTheSuppliedAccumulatorValueByTheSuppliedBigIntegerInput() throws Exception { Reducer<BigInteger, BigInteger> doubleMultiplicationAccumulator = Accumulators.bigIntegerMultiplicationAccumulator(); BigInteger result = doubleMultiplicationAccumulator.accumulate(new BigInteger("123"), new BigInteger("456")); assertThat(result, is(new BigInteger("56088"))); }
public static Reducer<BigInteger, BigInteger> bigIntegerMultiplicationAccumulator() { return new Reducer<BigInteger, BigInteger>() { @Override public BigInteger accumulate(BigInteger accumulator, BigInteger integer) { return accumulator.multiply(integer); } }; }
Accumulators { public static Reducer<BigInteger, BigInteger> bigIntegerMultiplicationAccumulator() { return new Reducer<BigInteger, BigInteger>() { @Override public BigInteger accumulate(BigInteger accumulator, BigInteger integer) { return accumulator.multiply(integer); } }; } }
Accumulators { public static Reducer<BigInteger, BigInteger> bigIntegerMultiplicationAccumulator() { return new Reducer<BigInteger, BigInteger>() { @Override public BigInteger accumulate(BigInteger accumulator, BigInteger integer) { return accumulator.multiply(integer); } }; } private  Accumulators(); }
Accumulators { public static Reducer<BigInteger, BigInteger> bigIntegerMultiplicationAccumulator() { return new Reducer<BigInteger, BigInteger>() { @Override public BigInteger accumulate(BigInteger accumulator, BigInteger integer) { return accumulator.multiply(integer); } }; } private  Accumulators(); static Reducer<Integer, Integer> integerAdditionAccumulator(); static Reducer<Long, Long> longAdditionAccumulator(); static Reducer<Double, Double> doubleAdditionAccumulator(); static Reducer<Float, Float> floatAdditionAccumulator(); static Reducer<BigDecimal, BigDecimal> bigDecimalAdditionAccumulator(); static Reducer<BigInteger, BigInteger> bigIntegerAdditionAccumulator(); static Reducer<Integer, Integer> integerMultiplicationAccumulator(); static Reducer<Long, Long> longMultiplicationAccumulator(); static Reducer<BigInteger, BigInteger> bigIntegerMultiplicationAccumulator(); static Reducer<Double, Double> doubleMultiplicationAccumulator(); static Reducer<Float, Float> floatMultiplicationAccumulator(); static Reducer<BigDecimal, BigDecimal> bigDecimalMultiplicationAccumulator(); }
Accumulators { public static Reducer<BigInteger, BigInteger> bigIntegerMultiplicationAccumulator() { return new Reducer<BigInteger, BigInteger>() { @Override public BigInteger accumulate(BigInteger accumulator, BigInteger integer) { return accumulator.multiply(integer); } }; } private  Accumulators(); static Reducer<Integer, Integer> integerAdditionAccumulator(); static Reducer<Long, Long> longAdditionAccumulator(); static Reducer<Double, Double> doubleAdditionAccumulator(); static Reducer<Float, Float> floatAdditionAccumulator(); static Reducer<BigDecimal, BigDecimal> bigDecimalAdditionAccumulator(); static Reducer<BigInteger, BigInteger> bigIntegerAdditionAccumulator(); static Reducer<Integer, Integer> integerMultiplicationAccumulator(); static Reducer<Long, Long> longMultiplicationAccumulator(); static Reducer<BigInteger, BigInteger> bigIntegerMultiplicationAccumulator(); static Reducer<Double, Double> doubleMultiplicationAccumulator(); static Reducer<Float, Float> floatMultiplicationAccumulator(); static Reducer<BigDecimal, BigDecimal> bigDecimalMultiplicationAccumulator();  }