Package it.tidalwave.role
Interface StringRenderable
-
- All Known Subinterfaces:
HtmlRenderable,PlainTextRenderable
- All Known Implementing Classes:
PersonHtmlRenderable
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface public interface StringRenderableThe role of an object that can be rendered into aStringas HTML markup.- Author:
- Fabrizio Giudici
- Stereotype:
- Role
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.Class<StringRenderable>_StringRenderable_
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description java.lang.Stringrender(java.lang.Object... args)Renders the attached object into aString.default voidrenderTo(java.io.PrintWriter printWriter, java.lang.Object... args)Renders the attached object printing to aPrintWriter.default voidrenderTo(java.lang.StringBuilder stringBuilder, java.lang.Object... args)Renders the attached object appending to aStringBuilder.
-
-
-
Field Detail
-
_StringRenderable_
static final java.lang.Class<StringRenderable> _StringRenderable_
-
-
Method Detail
-
render
@Nonnull java.lang.String render(@Nonnull java.lang.Object... args)Renders the attached object into aString. The method accepts optional parameters that can be used to control the format of the rendering; they are usually specific of the object attached to this role.- Parameters:
args- optional rendering parameters- Returns:
- the string
-
renderTo
default void renderTo(@Nonnull java.lang.StringBuilder stringBuilder, @Nonnull java.lang.Object... args)Renders the attached object appending to aStringBuilder. The method accepts optional parameters that can be used to control the format of the rendering; they are usually specific of the object attached to this role.- Parameters:
stringBuilder- theStringBuilderto append toargs- optional rendering parameters
-
renderTo
default void renderTo(@Nonnull java.io.PrintWriter printWriter, @Nonnull java.lang.Object... args)Renders the attached object printing to aPrintWriter. The method accepts optional parameters that can be used to control the format of the rendering; they are usually specific of the object attached to this role.- Parameters:
printWriter- thePrintWriterto print toargs- optional rendering parameters
-
-