public class StringParameter<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>> extends AbstractValuePluginParameter<G,A,R,java.lang.String>
PluginParameter
that holds a string value.Modifier and Type | Field and Description |
---|---|
static @NotNull java.lang.String |
PARAMETER_TYPE
The string representation of this parameter type.
|
Constructor and Description |
---|
StringParameter()
Creates a new instance.
|
Modifier and Type | Method and Description |
---|---|
@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.
|
boolean |
setStringValue(@NotNull java.lang.String stringValue)
Sets the parameter value from string representation.
|
<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
public 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 <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 call@NotNull public @NotNull java.lang.String getParameterType()
PluginParameter
@NotNull public @NotNull java.lang.String getStringValue()
PluginParameter