java.text
Class FieldPosition.Delegate
java.lang.Object
java.text.FieldPosition.Delegate
- All Implemented Interfaces:
- Format.FieldDelegate
- Enclosing class:
- FieldPosition
- private class FieldPosition.Delegate
- extends Object
- implements Format.FieldDelegate
An implementation of FieldDelegate that will adjust the begin/end
of the FieldPosition if the arguments match the field of
the FieldPosition.
Field Summary |
private boolean |
encounteredField
Indicates whether the field has been encountered before. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
encounteredField
private boolean encounteredField
- Indicates whether the field has been encountered before. If this
is true, and
formatted
is invoked, the begin/end
are not updated.
FieldPosition.Delegate
private FieldPosition.Delegate()
formatted
public void formatted(Format.Field attr,
Object value,
int start,
int end,
StringBuffer buffer)
- Description copied from interface:
Format.FieldDelegate
- Notified when a particular region of the String is formatted. This
method will be invoked if there is no corresponding integer field id
matching
attr
.
- Specified by:
formatted
in interface Format.FieldDelegate
- Parameters:
attr
- Identifies the field matchedvalue
- Value associated with the fieldstart
- Beginning location of the field, will be >= 0end
- End of the field, will be >= start and <= buffer.length()buffer
- Contains current formatted value, receiver should
NOT modify it.
formatted
public void formatted(int fieldID,
Format.Field attr,
Object value,
int start,
int end,
StringBuffer buffer)
- Description copied from interface:
Format.FieldDelegate
- Notified when a particular region of the String is formatted.
- Specified by:
formatted
in interface Format.FieldDelegate
- Parameters:
fieldID
- Identifies the field by integerattr
- Identifies the field matchedvalue
- Value associated with the fieldstart
- Beginning location of the field, will be >= 0end
- End of the field, will be >= start and <= buffer.length()buffer
- Contains current formatted value, receiver should
NOT modify it.