List of usage examples for java.text Format parseObject
public abstract Object parseObject(String source, ParsePosition pos);
From source file:de.odysseus.calyxo.base.util.ParseUtils.java
private static Object parse(Format format, String value) throws ParseException { ParsePosition pos = new ParsePosition(0); Object result = format.parseObject(value, pos); if (pos.getIndex() < value.length()) throw new ParseException("Cannot parse " + value + " (garbage suffix)!", pos.getIndex()); return result; }//from ww w . j a v a 2s . c om