Methods Summary |
---|
public boolean | equals(java.lang.Object obj)Overrides equals
if (obj == null) return false;
if (!(obj instanceof ParsePosition))
return false;
ParsePosition other = (ParsePosition) obj;
return (index == other.index && errorIndex == other.errorIndex);
|
public int | getErrorIndex()Retrieve the index at which an error occurred, or -1 if the
error index has not been set.
return errorIndex;
|
public int | getIndex()Retrieve the current parse position. On input to a parse method, this
is the index of the character at which parsing will begin; on output, it
is the index of the character following the last character parsed.
return index;
|
public int | hashCode()Returns a hash code for this ParsePosition.
return (errorIndex << 16) | index;
|
public void | setErrorIndex(int ei)Set the index at which a parse error occurred. Formatters
should set this before returning an error code from their
parseObject method. The default value is -1 if this is not set.
errorIndex = ei;
|
public void | setIndex(int index)Set the current parse position.
this.index = index;
|
public java.lang.String | toString()Return a string representation of this ParsePosition.
return getClass().getName() +
"[index=" + index +
",errorIndex=" + errorIndex + ']";
|