@Test(expected = IllegalArgumentException.class) public void stringIsNotConverted() { converter.apply(""); }
@Override public Double apply(Object input) { if (input instanceof Double) return (Double) input; if (input instanceof Number) return ((Number) input).doubleValue(); throw new IllegalArgumentException(format("There is no converter from [%s] to Double ", input.getClass().getName())); }
ObjectToDouble implements Function<Object, Double> { @Override public Double apply(Object input) { if (input instanceof Double) return (Double) input; if (input instanceof Number) return ((Number) input).doubleValue(); throw new IllegalArgumentException(format("There is no converter from [%s] to Double ", input.getClass().getName())); } }
ObjectToDouble implements Function<Object, Double> { @Override public Double apply(Object input) { if (input instanceof Double) return (Double) input; if (input instanceof Number) return ((Number) input).doubleValue(); throw new IllegalArgumentException(format("There is no converter from [%s] to Double ", input.getClass().getName())); }  }
ObjectToDouble implements Function<Object, Double> { @Override public Double apply(Object input) { if (input instanceof Double) return (Double) input; if (input instanceof Number) return ((Number) input).doubleValue(); throw new IllegalArgumentException(format("There is no converter from [%s] to Double ", input.getClass().getName())); }  @Override Double apply(Object input); }
ObjectToDouble implements Function<Object, Double> { @Override public Double apply(Object input) { if (input instanceof Double) return (Double) input; if (input instanceof Number) return ((Number) input).doubleValue(); throw new IllegalArgumentException(format("There is no converter from [%s] to Double ", input.getClass().getName())); }  @Override Double apply(Object input);  }