java.text
Class FieldPosition
java.lang.Object
|
+--java.text.FieldPosition
public class
FieldPositionextends
Object This class is used by the java.text formatting classes to track
field positions. A field position is defined by an identifier value
and begin and end index positions. The formatting classes in java.text
typically define constant values for the field identifiers.
Authors:- Aaron M. Renn (arenn@urbanophile.com)
- Per Bothner <bothner@cygnus.com>
FieldPosition
public FieldPosition(int field_id) This method initializes a new instance of FieldPosition to
have the specified field id.
Parameters:
equals
public boolean equals(java.lang.Object obj) This method tests this object for equality against the specified object.
The objects will be considered equal if and only if:
- The specified object is not
null.
- The specified object is an instance of
FieldPosition.
- The specified object has the same field identifier and beginning
and ending index as this object.
Parameters:
Returns:
true if the specified object is equal to
this object, false otherwise.
getBeginIndex
public int getBeginIndex() This method returns the beginning index for this field.
Returns:
getEndIndex
public int getEndIndex() This method returns the ending index for the field.
Returns:
getField
public int getField() This method returns the field identifier value for this object.
Returns:
setBeginIndex
public void setBeginIndex(int begin) This method sets the beginning index of this field to the specified value.
Parameters:
setEndIndex
public void setEndIndex(int end) This method sets the ending index of this field to the specified value.
Parameters:
toString
public String toString() This method returns a String representation of this
object.
Returns:
- A
String representation of this object.