public Number parse (String sourceStr) throws ParseException { ParsePosition pp = new ParsePosition (0); Number r = parse (sourceStr, pp); if (r == null) { int index = pp.getErrorIndex(); if (index < 0) index = pp.getIndex(); throw new ParseException ("couldn't parse number", index); } return r; }
public abstract Number parse (String sourceStr, ParsePosition pos);
  public Number parse (String sourceStr) throws ParseException  {    ParsePosition pp = new ParsePosition (0);    Number r = parse (sourceStr, pp);    if (r == null)      {	int index = pp.getErrorIndex();	if (index < 0)	  index = pp.getIndex();	throw new ParseException ("couldn't parse number", index);      }    return r;  }