public class MapParameter<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>> extends AbstractStringPluginParameter<G,A,R,MapControl<G,A,R>>
PluginParameter that holds a MapControl value.| Modifier and Type | Field and Description |
|---|---|
static @NotNull java.lang.String |
PARAMETER_TYPE
The string representation of this parameter type.
|
| Constructor and Description |
|---|
MapParameter(@NotNull MapManager<G,A,R> mapManager,
@NotNull PathManager pathManager)
Creates a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
@NotNull java.lang.String |
getParameterType()
Returns the parameter type name.
|
@NotNull MapControl<G,A,R> |
getValue()
Returns the current value of this parameter.
|
@Nullable MapControl<G,A,R> |
getValueOrNull()
Returns the current value of this parameter.
|
boolean |
isCurrentMap()
Returns whether the current map is selected.
|
void |
setValueToCurrent()
Selects the current map.
|
<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 MapParameter(@NotNull
@NotNull MapManager<G,A,R> mapManager,
@NotNull
@NotNull PathManager pathManager)
mapManager - the map manager for converting map paths to map control
instancespathManager - the path manager instance for converting files into
path names@NotNull public @NotNull java.lang.String getParameterType()
PluginParameter@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 MapControl<G,A,R> getValue() throws InvalidValueException
PluginParameterInvalidValueException - if the the value is invalid@Nullable public @Nullable MapControl<G,A,R> getValueOrNull()
PluginParameternull if the the value is invalidpublic void setValueToCurrent()
public boolean isCurrentMap()