@ConfigSerializable public static final class TextTemplate.Arg extends Object implements TextRepresentable
TextTemplate.apply(Map)
.Modifier and Type | Class and Description |
---|---|
static class |
TextTemplate.Arg.Builder
Represents a builder for
TextTemplate.Arg s. |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
String |
getCloseArgString()
Returns the end string of the Arg's container.
|
Optional<Text> |
getDefaultValue()
Returns the default value to use if the Arg
isOptional()
and no parameter is supplied. |
TextFormat |
getFormat()
Returns the base format to be applied to this Arg.
|
String |
getName()
Returns the name of this argument to be matched with incoming
parameters.
|
String |
getOpenArgString()
Returns the beginning string of the Arg's container.
|
int |
hashCode() |
boolean |
isOptional()
Returns true if this Arg is optional.
|
String |
toString() |
Text |
toText()
Gets the textual representation of this instance for its usage in other
Text objects. |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
applyTo
public String getName()
public boolean isOptional()
TextTemplateArgumentException
will be
thrown.public Optional<Text> getDefaultValue()
isOptional()
and no parameter is supplied.public TextFormat getFormat()
public String getOpenArgString()
public String getCloseArgString()
public Text toText()
TextRepresentable
Text
objects. This may but does not need to include
hover texts
or other actions
. This
method is basically the toString()
equivalent
for Text
s.toText
in interface TextRepresentable