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

Quick Search    Search Deep

java.text
Class FieldPosition  view FieldPosition download FieldPosition.java

java.lang.Object
  extended byjava.text.FieldPosition

public class FieldPosition
extends java.lang.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.


Field Summary
private  int begin
          This is the beginning index of the field.
private  int end
          This is the ending index of the field.
private  Format.Field field_attribute
          This is the field attribute value.
private  int field_id
          This is the field identifier value.
 
Constructor Summary
FieldPosition(Format.Field field)
          This method initializes a new instance of FieldPosition to have the specified field attribute.
FieldPosition(Format.Field field, int field_id)
          This method initializes a new instance of FieldPosition to have the specified field attribute.
FieldPosition(int field_id)
          This method initializes a new instance of FieldPosition to have the specified field id.
 
Method Summary
 boolean equals(java.lang.Object obj)
          This method tests this object for equality against the specified object.
 int getBeginIndex()
          This method returns the beginning index for this field.
 int getEndIndex()
          This method returns the ending index for the field.
 int getField()
          This method returns the field identifier value for this object.
 Format.Field getFieldAttribute()
           
 int hashCode()
          This method returns a hash value for this object
 void setBeginIndex(int begin)
          This method sets the beginning index of this field to the specified value.
 void setEndIndex(int end)
          This method sets the ending index of this field 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

field_id

private int field_id
This is the field identifier value.


begin

private int begin
This is the beginning index of the field.


end

private int end
This is the ending index of the field.


field_attribute

private Format.Field field_attribute
This is the field attribute value.

Constructor Detail

FieldPosition

public FieldPosition(Format.Field field)
This method initializes a new instance of FieldPosition to have the specified field attribute. The attribute will be used as an id. It is formally equivalent to calling FieldPosition(field, -1).


FieldPosition

public FieldPosition(Format.Field field,
                     int field_id)
This method initializes a new instance of FieldPosition to have the specified field attribute. The attribute will be used as an id is non null. The integer field id is only used if the Format.Field attribute is not used by the formatter.


FieldPosition

public FieldPosition(int field_id)
This method initializes a new instance of FieldPosition to have the specified field id.

Method Detail

getField

public int getField()
This method returns the field identifier value for this object.


getFieldAttribute

public Format.Field getFieldAttribute()

getBeginIndex

public int getBeginIndex()
This method returns the beginning index for this field.


setBeginIndex

public void setBeginIndex(int begin)
This method sets the beginning index of this field to the specified value.


getEndIndex

public int getEndIndex()
This method returns the ending index for the field.


setEndIndex

public void setEndIndex(int end)
This method sets the ending index of this field to the specified value.


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 has the same class as this object.
  • The specified object has the same field identifier, field attribute and beginning and ending index as this object.


hashCode

public int hashCode()
This method returns a hash value for this object


toString

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