public class ArchetypeParameter<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>> extends AbstractStringPluginParameter<G,A,R,Archetype<G,A,R>>
PluginParameter that holds an Archetype value.| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
PARAMETER_TYPE
The string representation of this parameter type.
|
| Constructor and Description |
|---|
ArchetypeParameter(ArchetypeSet<G,A,R> archetypeSet)
Creates a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getParameterType()
Returns the parameter type name.
|
Archetype<G,A,R> |
getValue()
Returns the current value of this parameter.
|
Archetype<G,A,R> |
getValueOrNull()
Returns the current value of this parameter.
|
<T> T |
visit(PluginParameterVisitor<G,A,R,T> visitor)
Calls the
visit() function for this parameter type. |
getStringValue, setStringValueaddPluginParameterListener, changed, getDescription, getName, removePluginParameterListener, setDescription, setName@NotNull public static final java.lang.String PARAMETER_TYPE
public ArchetypeParameter(@NotNull
ArchetypeSet<G,A,R> archetypeSet)
archetypeSet - the archetype set for looking up archetypes@NotNull
public <T> T visit(@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@NotNull public Archetype<G,A,R> getValue() throws InvalidValueException
InvalidValueException - if the the value is invalid@Nullable public Archetype<G,A,R> getValueOrNull()
null if the the value is invalid@NotNull public java.lang.String getParameterType()