public class BooleanParameter<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>> extends AbstractValuePluginParameter<G,A,R,java.lang.Boolean>
PluginParameter
that holds a boolean value.Modifier and Type | Field and Description |
---|---|
static @NotNull java.lang.String |
PARAMETER_TYPE
The string representation of this parameter type.
|
Constructor and Description |
---|
BooleanParameter()
Creates a new instance.
|
Modifier and Type | Method and Description |
---|---|
@NotNull java.lang.String |
getFalseText()
Returns the string representation of the "false" value.
|
@NotNull java.lang.String |
getParameterType()
Returns the parameter type name.
|
@NotNull java.lang.String |
getStringValue()
Returns the string representation of the current value of the parameter.
|
@NotNull java.lang.String |
getTrueText()
Returns the string representation of the "true" value.
|
void |
setFalseText(@NotNull java.lang.String falseText)
Sets the string representation of the "false" value.
|
boolean |
setStringValue(@NotNull java.lang.String stringValue)
Sets the parameter value from string representation.
|
void |
setTrueText(@NotNull java.lang.String trueText)
Sets the string representation of the "true" value.
|
<T> T |
visit(@NotNull PluginParameterVisitor<G,A,R,T> visitor)
Calls the
visit() function for this parameter type. |
getValue, getValueOrNull, setValue
addPluginParameterListener, changed, getDescription, getName, removePluginParameterListener, setDescription, setName
@NotNull public static final @NotNull java.lang.String PARAMETER_TYPE
@NotNull public <T> T visit(@NotNull @NotNull PluginParameterVisitor<G,A,R,T> visitor)
PluginParameter
visit()
function for this parameter type.T
- the visitor-specific type of the return valuevisitor
- the visitor to callpublic boolean setStringValue(@NotNull @NotNull java.lang.String stringValue)
PluginParameter
stringValue
- the string representation of the value to settrue
if the value was accepted or false
if the
value was not changed because the new value is invalid@NotNull public @NotNull java.lang.String getParameterType()
PluginParameter
@NotNull public @NotNull java.lang.String getStringValue()
PluginParameter
@NotNull public @NotNull java.lang.String getFalseText()
@NotNull public @NotNull java.lang.String getTrueText()
public void setFalseText(@NotNull @NotNull java.lang.String falseText)
falseText
- the string representationpublic void setTrueText(@NotNull @NotNull java.lang.String trueText)
trueText
- the string representation