/** Map the argument text into Boolean.TRUE or Boolean.FALSE using Boolean.valueOf. */ @Override public void setAsText(final String text) { if (BeanUtils.isNull(text)) { setValue(null); return; } Object newValue = Boolean.valueOf(text); setValue(newValue); }
@Override public void setAsText(final String text) { if (BeanUtils.isNull(text)) { setValue(null); } else { try { setValue(new BigDecimal(text)); } catch (NumberFormatException e) { throw new IllegalArgumentException("Failed to parse"); } } }