@Test public void testPlus() { Assert.assertEquals(MathFunctions.plus(3).apply(4), (Integer)7); Assert.assertEquals(MathFunctions.plus(3L).apply(4L), (Long)7L); Assert.assertEquals(MathFunctions.plus(0.3).apply(0.4).doubleValue(), 0.7, 0.00000001); }
public static Function<Number, Integer> plus(int addend) { return new PlusInt(addend); }
MathFunctions { public static Function<Number, Integer> plus(int addend) { return new PlusInt(addend); } }
MathFunctions { public static Function<Number, Integer> plus(int addend) { return new PlusInt(addend); }  }
MathFunctions { public static Function<Number, Integer> plus(int addend) { return new PlusInt(addend); }  static Function<Number, Integer> plus(int addend); static Function<Number, Long> plus(long addend); static Function<Number, Double> plus(final double addend); static Function<Number, Integer> times(final int multiplicand); static Function<Number, Long> times(long multiplicand); static Function<Number, Double> times(final double multiplicand); static Function<Number, Double> divide(double divisor); static Function<T, Double> divide(final Function<T, ? extends Number> preprocessor, final double divisor); static Function<Number, String> readableString(int significantDigits, int maxLen); static Function<Number, String> percent(int significantDigits); }
MathFunctions { public static Function<Number, Integer> plus(int addend) { return new PlusInt(addend); }  static Function<Number, Integer> plus(int addend); static Function<Number, Long> plus(long addend); static Function<Number, Double> plus(final double addend); static Function<Number, Integer> times(final int multiplicand); static Function<Number, Long> times(long multiplicand); static Function<Number, Double> times(final double multiplicand); static Function<Number, Double> divide(double divisor); static Function<T, Double> divide(final Function<T, ? extends Number> preprocessor, final double divisor); static Function<Number, String> readableString(int significantDigits, int maxLen); static Function<Number, String> percent(int significantDigits);  }