Methods Summary |
---|
void | clear()
beginIndex = endIndex = 0;
|
public boolean | equals(java.lang.Object object)Compares the specified object to this field position and indicates if
they are equal. In order to be equal, {@code object} must be an instance
of {@code FieldPosition} with the same field, begin index and end index.
if (!(object instanceof FieldPosition)) {
return false;
}
FieldPosition pos = (FieldPosition) object;
return myField == pos.myField && myAttribute == pos.myAttribute
&& beginIndex == pos.beginIndex && endIndex == pos.endIndex;
|
public int | getBeginIndex()Returns the index of the beginning of the field.
return beginIndex;
|
public int | getEndIndex()Returns the index one past the end of the field.
return endIndex;
|
public int | getField()Returns the field which is being identified.
return myField;
|
public java.text.Format$Field | getFieldAttribute()Returns the attribute which is being identified.
return myAttribute;
|
public int | hashCode()
int attributeHash = (myAttribute == null) ? 0 : myAttribute.hashCode();
return attributeHash + myField * 10 + beginIndex * 100 + endIndex;
|
public void | setBeginIndex(int index)Sets the index of the beginning of the field.
beginIndex = index;
|
public void | setEndIndex(int index)Sets the index of the end of the field.
endIndex = index;
|
public java.lang.String | toString()Returns the string representation of this field position.
return getClass().getName() + "[attribute=" + myAttribute + ", field=" //$NON-NLS-1$ //$NON-NLS-2$
+ myField + ", beginIndex=" + beginIndex + ", endIndex=" //$NON-NLS-1$ //$NON-NLS-2$
+ endIndex + "]"; //$NON-NLS-1$
|