@Test public void testParse() throws ParsingException { assertNull(type.parse(null)); assertEquals(BigDecimal.ZERO, type.parse("0")); assertEquals(BigDecimal.ONE, type.parse("1")); assertEquals(new BigDecimal("12.34567"), type.parse("12.34567")); assertEquals(new BigDecimal("-300.724578"), type.parse("-300.724578")); }
@Override public BigDecimal parse(String sourceValue) throws ParsingException { if (sourceValue == null) { return null; } try { return new BigDecimal(sourceValue); } catch (Exception e) { throw new ParsingException("Unable to convert to a BigDecimal numeric value", sourceValue, e); } }
BigDecType extends BaseValueType<BigDecimal> { @Override public BigDecimal parse(String sourceValue) throws ParsingException { if (sourceValue == null) { return null; } try { return new BigDecimal(sourceValue); } catch (Exception e) { throw new ParsingException("Unable to convert to a BigDecimal numeric value", sourceValue, e); } } }
BigDecType extends BaseValueType<BigDecimal> { @Override public BigDecimal parse(String sourceValue) throws ParsingException { if (sourceValue == null) { return null; } try { return new BigDecimal(sourceValue); } catch (Exception e) { throw new ParsingException("Unable to convert to a BigDecimal numeric value", sourceValue, e); } } private  BigDecType(); }
BigDecType extends BaseValueType<BigDecimal> { @Override public BigDecimal parse(String sourceValue) throws ParsingException { if (sourceValue == null) { return null; } try { return new BigDecimal(sourceValue); } catch (Exception e) { throw new ParsingException("Unable to convert to a BigDecimal numeric value", sourceValue, e); } } private  BigDecType(); static BigDecType instance(); @Override BigDecimal parse(String sourceValue); @Override BigDecimal cast(Object o); }
BigDecType extends BaseValueType<BigDecimal> { @Override public BigDecimal parse(String sourceValue) throws ParsingException { if (sourceValue == null) { return null; } try { return new BigDecimal(sourceValue); } catch (Exception e) { throw new ParsingException("Unable to convert to a BigDecimal numeric value", sourceValue, e); } } private  BigDecType(); static BigDecType instance(); @Override BigDecimal parse(String sourceValue); @Override BigDecimal cast(Object o);  }