V - is the generic type of the actual value to format.public abstract class AbstractFormatter<V> extends Object implements Formatter<V>
Formatter interface.| Constructor and Description |
|---|
AbstractFormatter()
The constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected abstract void |
doFormat(V value,
Appendable buffer) |
String |
format(V value)
This method formats the given
value. |
void |
format(V value,
Appendable buffer)
|
protected String |
formatNull()
Returns the (static) string representation for the undefined value
null. |
public String format(V value)
Formattervalue. StringBuilderbuffer = new StringBuilder();format(value, buffer); return buffer.toString();
public void format(V value, Appendable buffer) throws RuntimeIoException
Formatterformat in interface Formatter<V>value - is the value to format. May be null.buffer - is the Appendable to append the formatted value to.RuntimeIoException - if append caused a IOException.protected String formatNull()
null.protected abstract void doFormat(V value, Appendable buffer) throws IOException
value - is the value to format (not null).buffer - is the Appendable to append the formatted value to.IOException - if caused by append.format(Object, Appendable)Copyright © 2001–2016 mmm-Team. All rights reserved.