private static class FastDateFormat.PaddedNumberField extends java.lang.Object implements FastDateFormat.NumberRule
Inner class to output a padded number.
Constructor and Description |
---|
PaddedNumberField(int field,
int size)
Constructs an instance of
PaddedNumberField . |
Modifier and Type | Method and Description |
---|---|
void |
appendTo(java.lang.StringBuffer buffer,
java.util.Calendar calendar)
Appends the value of the specified calendar to the output buffer based on the rule implementation.
|
void |
appendTo(java.lang.StringBuffer buffer,
int value)
Appends the specified value to the output buffer based on the rule implementation.
|
int |
estimateLength()
Returns the estimated lentgh of the result.
|
PaddedNumberField(int field, int size)
PaddedNumberField
.field
- the fieldsize
- size of the output fieldpublic int estimateLength()
estimateLength
in interface FastDateFormat.Rule
public void appendTo(java.lang.StringBuffer buffer, java.util.Calendar calendar)
appendTo
in interface FastDateFormat.Rule
buffer
- the output buffercalendar
- calendar to be appendedpublic final void appendTo(java.lang.StringBuffer buffer, int value)
appendTo
in interface FastDateFormat.NumberRule
buffer
- the output buffervalue
- the value to be appended