Oracle Fusion Middleware Java API Reference for Oracle ADF Mobile Client
11g Release 1 (11.1.1)

E17503-02

oracle.adfnmc.java.text
Class FieldPosition

java.lang.Object
  extended by oracle.adfnmc.java.text.FieldPosition

public class FieldPosition
extends java.lang.Object

FieldPosition is used to identify fields in formatted Strings.


Constructor Summary
FieldPosition(Format.Field attribute)
          Constructs a new FieldPosition on the specified Field attribute.
FieldPosition(Format.Field attribute, int field)
          Constructs a new FieldPosition on the specified Field attribute and field id.
FieldPosition(int field)
          Constructs a new FieldPosition on the specified field.
 
Method Summary
 boolean equals(java.lang.Object object)
          Compares the specified object to this FieldPosition and answer if they are equal.
 int getBeginIndex()
          Answers the index of the beginning of the field.
 int getEndIndex()
          Answers the index one past the end of the field.
 int getField()
          Answers the field which is being identified.
 Format.Field getFieldAttribute()
          Answers the attribute which is being identified.
 int hashCode()
          Answers an integer hash code for the receiver.
 void setBeginIndex(int index)
          Sets the index of the beginning of the field.
 void setEndIndex(int index)
          Sets the index of the end of the field.
 java.lang.String toString()
          Answers the string representation of this FieldPosition.
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FieldPosition

public FieldPosition(int field)
Constructs a new FieldPosition on the specified field.

Parameters:
field - the field to identify

FieldPosition

public FieldPosition(Format.Field attribute)
Constructs a new FieldPosition on the specified Field attribute.

Parameters:
attribute - the field attribute to identify

FieldPosition

public FieldPosition(Format.Field attribute,
                     int field)
Constructs a new FieldPosition on the specified Field attribute and field id.

Parameters:
attribute - the field attribute to identify
field - the field to identify
Method Detail

equals

public boolean equals(java.lang.Object object)
Compares the specified object to this FieldPosition and answer if they are equal. The object must be an instance of FieldPosition with the same field, begin index and end index.

Overrides:
equals in class java.lang.Object
Parameters:
object - the object to compare with this object
Returns:
true if the specified object is equal to this fieldPosition, false otherwise
See Also:
hashCode()

getBeginIndex

public int getBeginIndex()
Answers the index of the beginning of the field.

Returns:
the first index of the field

getEndIndex

public int getEndIndex()
Answers the index one past the end of the field.

Returns:
one past the index of the last character in the field

getField

public int getField()
Answers the field which is being identified.

Returns:
the field

getFieldAttribute

public Format.Field getFieldAttribute()
Answers the attribute which is being identified.

Returns:
the field

hashCode

public int hashCode()
Answers an integer hash code for the receiver. Objects which are equal answer the same value for this method.

Overrides:
hashCode in class java.lang.Object
Returns:
the receiver's hash
See Also:
equals(java.lang.Object)

setBeginIndex

public void setBeginIndex(int index)
Sets the index of the beginning of the field.

Parameters:
index - the index of the first character in the field

setEndIndex

public void setEndIndex(int index)
Sets the index of the end of the field.

Parameters:
index - one past the index of the last character in the field

toString

public java.lang.String toString()
Answers the string representation of this FieldPosition.

Overrides:
toString in class java.lang.Object
Returns:
the string representation of this FieldPosition

Oracle Fusion Middleware Java API Reference for Oracle ADF Mobile Client
11g Release 1 (11.1.1)

E17503-02

Copyright © 2011, Oracle and/or its affiliates. All rights reserved.