public static final class TextTemplate.Arg.Builder extends Object
TextTemplate.Arg
s.Modifier and Type | Method and Description |
---|---|
TextTemplate.Arg |
build()
Builds a new
TextTemplate.Arg . |
TextTemplate.Arg.Builder |
color(TextColor color)
Sets the "base" color of the Arg.
|
TextTemplate.Arg.Builder |
defaultValue(Text defaultValue)
Sets the default value for the Argument.
|
TextTemplate.Arg.Builder |
format(TextFormat format)
Sets the "base" format of the Arg.
|
TextTemplate.Arg.Builder |
optional()
Makes the Arg optional.
|
TextTemplate.Arg.Builder |
optional(boolean optional)
Sets whether the Arg should be optional (false by default).
|
TextTemplate.Arg.Builder |
style(TextStyle style)
Sets the "base" style of the Arg.
|
String |
toString() |
public TextTemplate.Arg build()
TextTemplate.Arg
. Note that it is not necessary to call
this method when supplying an argument to a template. You may
pass the builder to TextTemplate.of(Object...)
directly.public TextTemplate.Arg.Builder optional(boolean optional)
optional
- True if should be optionalpublic TextTemplate.Arg.Builder optional()
public TextTemplate.Arg.Builder defaultValue(Text defaultValue)
defaultValue
- Default valuepublic TextTemplate.Arg.Builder format(TextFormat format)
format
- Base format of Argpublic TextTemplate.Arg.Builder color(TextColor color)
color
- Base color of Argpublic TextTemplate.Arg.Builder style(TextStyle style)
style
- Base style of Arg