FloatConverter implements ITypeConverter<Float> { @Override public Float convert(String value) { try { return numberFormat.parse(value).floatValue(); } catch(Exception e) { throw new RuntimeException(e); } } FloatConverter();  FloatConverter(NumberFormat numberFormat); @Override Float convert(String value); @Override Type getTargetType(); @Override String toString();  }
@Test public void testConvert() throws Exception { Float val = new FloatConverter().convert("2.00001"); Assert.assertEquals(2.00001, val, 1e-5); }