java.text
Class ParsePosition
java.lang.Object
|
+--java.text.ParsePosition
public class
ParsePositionextends
Object This class is used to keep track of the current position during parsing
operations.
Authors:- Aaron M. Renn (arenn@urbanophile.com)
- Per Bothner <bothner@cygnus.com>
ParsePosition
public ParsePosition(int index)
This method initializes a new instance of ParsePosition
to
have the specified initial index value.
Parameters:
equals
public boolean equals(java.lang.Object obj)
This method tests the specified object for equality with this
object. The two objects will be considered equal if and only if
all of the following conditions are met.
- The specified object is not
null
.
- The specified object is an instance of
ParsePosition
.
- The specified object has the same index and error index as
this object.
Parameters:
Returns:
true
if the specified object is equal to
this object, false
otherwise.
getErrorIndex
public int getErrorIndex()
This method returns the error index value. This value defaults to -1
unless explicitly set to another value.
Returns:
getIndex
public int getIndex()
This method returns the current parsing index.
Returns:
- The current parsing index
setErrorIndex
public void setErrorIndex(int error_index)
This method sets the error index to the specified value.
Parameters:
setIndex
public void setIndex(int index)
This method sets the current parsing index to the specified value.
Parameters:
toString
public String toString()
This method returns a String
representation of this
object.
Returns:
- A
String
that represents this object.