402 * The method attempts to parse text starting at the index given by
403 * <code>pos</code>.
404 * If parsing succeeds, then the index of <code>pos</code> is updated
405 * to the index after the last character used (parsing does not necessarily
406 * use all characters up to the end of the string), and the parsed
407 * date is returned. The updated <code>pos</code> can be used to
408 * indicate the starting point for the next call to this method.
409 * If an error occurs, then the index of <code>pos</code> is not
410 * changed, the error index of <code>pos</code> is set to the index of
411 * the character where the error occurred, and null is returned.
412 * <p>
413 * See the {@link #parse(String, ParsePosition)} method for more information
414 * on date parsing.
415 *
416 * @param source A <code>String</code>, part of which should be parsed.
417 * @param pos A <code>ParsePosition</code> object with index and error
418 * index information as described above.
419 * @return A <code>Date</code> parsed from the string. In case of
420 * error, returns null.
421 * @exception NullPointerException if <code>pos</code> is null.
422 */
423 public Object parseObject(String source, ParsePosition pos) {
424 return parse(source, pos);
425 }
426
427 /**
428 * Constant for full style pattern.
429 */
430 public static final int FULL = 0;
431 /**
432 * Constant for long style pattern.
433 */
434 public static final int LONG = 1;
435 /**
436 * Constant for medium style pattern.
437 */
438 public static final int MEDIUM = 2;
439 /**
440 * Constant for short style pattern.
441 */
|
402 * The method attempts to parse text starting at the index given by
403 * <code>pos</code>.
404 * If parsing succeeds, then the index of <code>pos</code> is updated
405 * to the index after the last character used (parsing does not necessarily
406 * use all characters up to the end of the string), and the parsed
407 * date is returned. The updated <code>pos</code> can be used to
408 * indicate the starting point for the next call to this method.
409 * If an error occurs, then the index of <code>pos</code> is not
410 * changed, the error index of <code>pos</code> is set to the index of
411 * the character where the error occurred, and null is returned.
412 * <p>
413 * See the {@link #parse(String, ParsePosition)} method for more information
414 * on date parsing.
415 *
416 * @param source A <code>String</code>, part of which should be parsed.
417 * @param pos A <code>ParsePosition</code> object with index and error
418 * index information as described above.
419 * @return A <code>Date</code> parsed from the string. In case of
420 * error, returns null.
421 * @exception NullPointerException if <code>pos</code> is null.
422 * @throws NullPointerException if {@code source} is null.
423 */
424 public Object parseObject(String source, ParsePosition pos) {
425 return parse(source, pos);
426 }
427
428 /**
429 * Constant for full style pattern.
430 */
431 public static final int FULL = 0;
432 /**
433 * Constant for long style pattern.
434 */
435 public static final int LONG = 1;
436 /**
437 * Constant for medium style pattern.
438 */
439 public static final int MEDIUM = 2;
440 /**
441 * Constant for short style pattern.
442 */
|