DoubleFunction1D extends Function1D<Double, Double> { public static DoubleFunction1D from(final Function1D<Double, Double> f) { Validate.notNull(f, "f"); return new DoubleFunction1D() { @Override public Double evaluate(final Double x) { return f.evaluate(x); } }; }  DoubleFunction1D derivative(); DoubleFunction1D derivative(final FiniteDifferenceType differenceType, final double eps); DoubleFunction1D add(final DoubleFunction1D f); DoubleFunction1D add(final double a); DoubleFunction1D divide(final DoubleFunction1D f); DoubleFunction1D divide(final double a); DoubleFunction1D multiply(final DoubleFunction1D f); DoubleFunction1D multiply(final double a); DoubleFunction1D subtract(final DoubleFunction1D f); DoubleFunction1D subtract(final double a); static DoubleFunction1D from(final Function1D<Double, Double> f);  }
@Test(expectedExceptions = IllegalArgumentException.class) public void testConvertNull() { DoubleFunction1D.from(null); }