public final class SafeHtmlBuilder extends Object
Modifier and Type | Field and Description |
---|---|
static SafeHtml |
EMPTY_SAFE_HTML
Default empty
SafeHtml . |
Modifier and Type | Method and Description |
---|---|
SafeHtmlBuilder |
append(boolean value)
Appends a boolean to the builder.
|
SafeHtmlBuilder |
append(byte value)
Appends a byte to the builder.
|
SafeHtmlBuilder |
append(char value)
Appends a char to the builder.
|
SafeHtmlBuilder |
append(double value)
Appends a double to the builder.
|
SafeHtmlBuilder |
append(int value)
Appends a integer to the builder.
|
SafeHtmlBuilder |
append(SafeHtml value)
Appends the contents of another safe html object.
|
SafeHtmlBuilder |
appendEscaped(String value)
Appends a string to the builder.
|
SafeHtmlBuilder |
appendEscapedLines(String value)
Appends a string to the builder, splitting the string if contains line separators.
|
SafeHtmlBuilder |
appendHtmlConstant(String value)
Appends a string without any escaping.
|
static SafeHtmlBuilder |
create()
Creates and returns a safe html builder to consume.
|
SafeHtml |
toSafeHtml()
Returns the safe html instance.
|
public static SafeHtmlBuilder create()
public SafeHtmlBuilder append(boolean value)
value
- the boolean to addpublic SafeHtmlBuilder append(byte value)
value
- the byte to addpublic SafeHtmlBuilder append(char value)
value
- the char to addpublic SafeHtmlBuilder append(double value)
value
- the double to addpublic SafeHtmlBuilder append(int value)
value
- the integer to addpublic SafeHtmlBuilder append(SafeHtml value)
value
- the safe html instance to addpublic SafeHtmlBuilder appendEscaped(String value)
value
- the string to addpublic SafeHtmlBuilder appendEscapedLines(String value)
value
- the string to appendpublic SafeHtmlBuilder appendHtmlConstant(String value)
value
- the HTML to be appendedpublic SafeHtml toSafeHtml()