java.lang.Object | |
↳ | java.text.ParsePosition |
Tracks the current position in a parsed string. In case of an error the error index can be set to the position where the error occurred without having to change the parse position.
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Constructs a new
ParsePosition with the specified index. |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Compares the specified object to this
ParsePosition and indicates
if they are equal. | |||||||||||
Returns the index at which the parse could not continue.
| |||||||||||
Returns the current parse position.
| |||||||||||
Returns an integer hash code for this object.
| |||||||||||
Sets the index at which the parse could not continue.
| |||||||||||
Sets the current parse position.
| |||||||||||
Returns the string representation of this parse position.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
|
Constructs a new ParsePosition
with the specified index.
index | the index to begin parsing. |
---|
Compares the specified object to this ParsePosition
and indicates
if they are equal. In order to be equal, object
must be an
instance of ParsePosition
and it must have the same index and
error index.
object | the object to compare with this object. |
---|
true
if the specified object is equal to this
ParsePosition
; false
otherwise.Returns the index at which the parse could not continue.
Returns the current parse position.
Returns an integer hash code for this object. By contract, any two
objects for which equals(Object)
returns true
must return
the same hash code value. This means that subclasses of Object
usually override both methods or neither method.
Note that hash values must not change over time unless information used in equals comparisons also changes.
See Writing a correct hashCode
method
if you intend implementing your own hashCode
method.
Sets the index at which the parse could not continue.
index | the index of the parse error. |
---|
Sets the current parse position.
index | the current parse position. |
---|
Returns the string representation of this parse position.