Function1D implements Function<S, T>, Serializable { @SuppressWarnings("unchecked") @Override public T evaluate(final S... x) { ArgumentChecker.noNulls(x, "parameter list"); ArgumentChecker.isTrue(x.length == 1, "parameter list must have one element"); return evaluate(x[0]); }  @SuppressWarnings("unchecked") @Override T evaluate(final S... x); abstract T evaluate(S x);  }
@Test(expectedExceptions = IllegalArgumentException.class) public void testNullInputList() { F.evaluate((Double[]) null); }
@Test(expectedExceptions = IllegalArgumentException.class) public void testEmptyInputList() { F.evaluate(new Double[0]); }
@Test(expectedExceptions = IllegalArgumentException.class) public void testInputListWithNulls() { F.evaluate(new Double[] {null}); }