@NotThreadSafe public static final class Text.Builder extends Object
| Modifier and Type | Method and Description |
|---|---|
Text |
build()
Builds a new
Text. |
Text.Builder |
from(TextIF instance)
Fill a builder with attribute values from the provided
TextIF instance. |
Text.Builder |
setEmoji(Boolean emoji)
Initializes the optional value
emoji to emoji. |
Text.Builder |
setEmoji(Optional<Boolean> emoji)
Initializes the optional value
emoji to emoji. |
Text.Builder |
setText(String text)
Initializes the value for the
text attribute. |
Text.Builder |
setType(TextType type)
Initializes the value for the
type attribute. |
Text.Builder |
setVerbatim(Boolean verbatim)
Initializes the optional value
verbatim to verbatim. |
Text.Builder |
setVerbatim(Optional<Boolean> verbatim)
Initializes the optional value
verbatim to verbatim. |
public final Text.Builder from(TextIF instance)
TextIF instance.
Regular attribute values will be replaced with those from the given instance.
Absent optional values will not replace present values.instance - The instance from which to copy valuesthis builder for use in a chained invocationpublic final Text.Builder setType(TextType type)
type attribute.type - The value for typethis builder for use in a chained invocationpublic final Text.Builder setText(String text)
text attribute.text - The value for textthis builder for use in a chained invocationpublic final Text.Builder setEmoji(@Nullable Boolean emoji)
emoji to emoji.emoji - The value for emoji, null is accepted as java.util.Optional.empty()this builder for chained invocationpublic final Text.Builder setEmoji(Optional<Boolean> emoji)
emoji to emoji.emoji - The value for emojithis builder for use in a chained invocationpublic final Text.Builder setVerbatim(@Nullable Boolean verbatim)
verbatim to verbatim.verbatim - The value for verbatim, null is accepted as java.util.Optional.empty()this builder for chained invocationpublic final Text.Builder setVerbatim(Optional<Boolean> verbatim)
verbatim to verbatim.verbatim - The value for verbatimthis builder for use in a chained invocationCopyright © 2019. All rights reserved.