Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

java.text
Class ParsePosition  view ParsePosition download ParsePosition.java

java.lang.Object
  extended byjava.text.ParsePosition

public class ParsePosition
extends java.lang.Object

This class is used to keep track of the current position during parsing operations.


Field Summary
private  int error_index
          This is the index of the position where an error occurred during parsing.
private  int index
          This is the index of the current parse position.
 
Constructor Summary
ParsePosition(int index)
          This method initializes a new instance of ParsePosition to have the specified initial index value.
 
Method Summary
 boolean equals(java.lang.Object obj)
          This method tests the specified object for equality with this object.
 int getErrorIndex()
          This method returns the error index value.
 int getIndex()
          This method returns the current parsing index.
 int hashCode()
          Return the hash code for this object.
 void setErrorIndex(int error_index)
          This method sets the error index to the specified value.
 void setIndex(int index)
          This method sets the current parsing index to the specified value.
 java.lang.String toString()
          This method returns a String representation of this object.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

index

private int index
This is the index of the current parse position.


error_index

private int error_index
This is the index of the position where an error occurred during parsing.

Constructor Detail

ParsePosition

public ParsePosition(int index)
This method initializes a new instance of ParsePosition to have the specified initial index value.

Method Detail

getIndex

public int getIndex()
This method returns the current parsing index.


setIndex

public void setIndex(int index)
This method sets the current parsing index to the specified value.


getErrorIndex

public int getErrorIndex()
This method returns the error index value. This value defaults to -1 unless explicitly set to another value.


setErrorIndex

public void setErrorIndex(int error_index)
This method sets the error index to the specified value.


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.


hashCode

public int hashCode()
Return the hash code for this object.


toString

public java.lang.String toString()
This method returns a String representation of this object.