/** * Returns a String representation of the Object <code>value</code>. This invokes <code>format * </code> on the current <code>Format</code>. * * @throws ParseException if there is an error in the conversion * @param value Value to convert * @return String representation of value */ public String valueToString(Object value) throws ParseException { if (value == null) { return ""; } Format f = getFormat(); if (f == null) { return value.toString(); } return f.format(value); }
/** Invokes <code>parseObject</code> on <code>f</code>, returning its value. */ Object stringToValue(String text, Format f) throws ParseException { if (f == null) { return text; } return f.parseObject(text); }