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 @NotNull java.lang.String |
PARAMETER_TYPE
The string representation of this parameter type.
|
| Constructor and Description |
|---|
ArchetypeParameter(@NotNull ArchetypeSet<G,A,R> archetypeSet)
Creates a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
@NotNull java.lang.String |
getParameterType()
Returns the parameter type name.
|
@NotNull Archetype<G,A,R> |
getValue()
Returns the current value of this parameter.
|
@Nullable Archetype<G,A,R> |
getValueOrNull()
Returns the current value of this parameter.
|
<T> T |
visit(@NotNull 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 @NotNull java.lang.String PARAMETER_TYPE
public ArchetypeParameter(@NotNull
@NotNull ArchetypeSet<G,A,R> archetypeSet)
archetypeSet - the archetype set for looking up archetypes@NotNull
public <T> T visit(@NotNull
@NotNull PluginParameterVisitor<G,A,R,T> visitor)
PluginParametervisit() function for this parameter type.T - the visitor-specific type of the return valuevisitor - the visitor to call@NotNull public @NotNull Archetype<G,A,R> getValue() throws InvalidValueException
PluginParameterInvalidValueException - if the the value is invalid@Nullable public @Nullable Archetype<G,A,R> getValueOrNull()
PluginParameternull if the the value is invalid@NotNull public @NotNull java.lang.String getParameterType()
PluginParameter