equal
deleted
inserted
replaced
223 * @param source A <code>String</code>, part of which should be parsed. |
223 * @param source A <code>String</code>, part of which should be parsed. |
224 * @param pos A <code>ParsePosition</code> object with index and error |
224 * @param pos A <code>ParsePosition</code> object with index and error |
225 * index information as described above. |
225 * index information as described above. |
226 * @return An <code>Object</code> parsed from the string. In case of |
226 * @return An <code>Object</code> parsed from the string. In case of |
227 * error, returns null. |
227 * error, returns null. |
228 * @exception NullPointerException if <code>pos</code> is null. |
228 * @throws NullPointerException if {@code source} or {@code pos} is null. |
229 */ |
229 */ |
230 public abstract Object parseObject (String source, ParsePosition pos); |
230 public abstract Object parseObject (String source, ParsePosition pos); |
231 |
231 |
232 /** |
232 /** |
233 * Parses text from the beginning of the given string to produce an object. |
233 * Parses text from the beginning of the given string to produce an object. |
235 * |
235 * |
236 * @param source A <code>String</code> whose beginning should be parsed. |
236 * @param source A <code>String</code> whose beginning should be parsed. |
237 * @return An <code>Object</code> parsed from the string. |
237 * @return An <code>Object</code> parsed from the string. |
238 * @exception ParseException if the beginning of the specified string |
238 * @exception ParseException if the beginning of the specified string |
239 * cannot be parsed. |
239 * cannot be parsed. |
|
240 * @throws NullPointerException if {@code source} is null. |
240 */ |
241 */ |
241 public Object parseObject(String source) throws ParseException { |
242 public Object parseObject(String source) throws ParseException { |
242 ParsePosition pos = new ParsePosition(0); |
243 ParsePosition pos = new ParsePosition(0); |
243 Object result = parseObject(source, pos); |
244 Object result = parseObject(source, pos); |
244 if (pos.index == 0) { |
245 if (pos.index == 0) { |