public interface PluginParameter<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>,V>
| Modifier and Type | Method and Description |
|---|---|
void |
addPluginParameterListener(@NotNull PluginParameterListener listener)
Adds a
listener to be notified. |
@NotNull java.lang.String |
getDescription()
The user-provided description of the value for the user interface.
|
@NotNull java.lang.String |
getName()
The name of the parameter.
|
@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.
|
V |
getValue()
Returns the current value of this parameter.
|
V |
getValueOrNull()
Returns the current value of this parameter.
|
void |
removePluginParameterListener(@NotNull PluginParameterListener listener)
Removes a
listener to be notified. |
void |
setDescription(@NotNull java.lang.String description)
Sets the user-provided description of the value for the user interface.
|
void |
setName(@NotNull java.lang.String name)
Sets the name 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. |
void addPluginParameterListener(@NotNull
@NotNull PluginParameterListener listener)
listener to be notified.listener - the listenervoid removePluginParameterListener(@NotNull
@NotNull PluginParameterListener listener)
listener to be notified.listener - the listener@NotNull @NotNull java.lang.String getName()
void setName(@NotNull
@NotNull java.lang.String name)
name - the name@NotNull @NotNull java.lang.String getParameterType()
@NotNull @NotNull java.lang.String getDescription()
void setDescription(@NotNull
@NotNull java.lang.String description)
description - the description@NotNull V getValue() throws InvalidValueException
InvalidValueException - if the the value is invalid@Nullable V getValueOrNull()
null if the the value is invalid@NotNull @NotNull java.lang.String getStringValue()
boolean setStringValue(@NotNull
@NotNull java.lang.String stringValue)
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
<T> T visit(@NotNull
@NotNull PluginParameterVisitor<G,A,R,T> visitor)
visit() function for this parameter type.T - the visitor-specific type of the return valuevisitor - the visitor to call