public class FieldPosition extends Object
Constructor and Description |
---|
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. |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(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.
|
String |
toString()
This method returns a
String representation of this
object. |
public FieldPosition(Format.Field field)
FieldPosition
to have the specified field attribute. The attribute will be used as
an id. It is formally equivalent to calling FieldPosition(field, -1).field
- The field format attribute.public FieldPosition(Format.Field field, int field_id)
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.field
- The field format attribute.field_id
- The field identifier value.public FieldPosition(int field_id)
FieldPosition
to
have the specified field id.field_id
- The field identifier value.public int getField()
public Format.Field getFieldAttribute()
public int getBeginIndex()
public void setBeginIndex(int begin)
begin
- The new beginning index.public int getEndIndex()
public void setEndIndex(int end)
end
- The new ending index.public boolean equals(Object obj)
null
.
equals
in class Object
obj
- The object to test for equality to this object.true
if the specified object is equal to
this object, false
otherwise.Object.hashCode()
public int hashCode()
hashCode
in class Object
Object.equals(Object)
,
System.identityHashCode(Object)
public String toString()
String
representation of this
object.toString
in class Object
String
representation of this object.Object.getClass()
,
Object.hashCode()
,
Class.getName()
,
Integer.toHexString(int)