private static class FastDatePrinter.StringLiteral extends java.lang.Object implements FastDatePrinter.Rule
Inner class to output a constant string.
Modifier and Type | Field and Description |
---|---|
private java.lang.String |
mValue |
Constructor and Description |
---|
StringLiteral(java.lang.String value)
Constructs a new instance of
StringLiteral
to hold the specified value. |
Modifier and Type | Method and Description |
---|---|
void |
appendTo(java.lang.Appendable buffer,
java.util.Calendar calendar)
Appends the value of the specified calendar to the output buffer based on the rule implementation.
|
int |
estimateLength()
Returns the estimated length of the result.
|
StringLiteral(java.lang.String value)
StringLiteral
to hold the specified value.value
- the string literalpublic int estimateLength()
estimateLength
in interface FastDatePrinter.Rule
public void appendTo(java.lang.Appendable buffer, java.util.Calendar calendar) throws java.io.IOException
appendTo
in interface FastDatePrinter.Rule
buffer
- the output buffercalendar
- calendar to be appendedjava.io.IOException
- if an I/O error occurs