AbstractRenderer<T> abstract class
Abstract implementation of a renderer to make implementation of rendering simpler.
@param <T> the type to render
abstract class AbstractRenderer<T> implements Renderer<T> {
/**
* Renders {@code object} as plain text, appended directly to {@code
* appendable}. Should never throw any exceptions except if {@code appendable}
* throws an {@code IOException}.
*/
void renderTo(T object, Appendable appendable) {
appendable.append(render(object));
}
}
Subclasses
DateTimeFormatRenderer, DoubleRenderer, IntegerRenderer, NumberFormatRenderer, PassthroughRenderer
Implements
Methods
abstract String render(T object) #
inherited from Renderer
Renders {@code object} as plain text. Should never throw any exceptions!
void renderTo(T object, Appendable appendable) #
Renders {@code object} as plain text, appended directly to {@code appendable}. Should never throw any exceptions except if {@code appendable} throws an {@code IOException}.
void renderTo(T object, Appendable appendable) {
appendable.append(render(object));
}