public class MapPathParameter<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>> extends AbstractStringPluginParameter<G,A,R,java.lang.String>
PluginParameter that holds a path with in the maps directory.| Modifier and Type | Field and Description |
|---|---|
static @NotNull java.lang.String |
PARAMETER_TYPE
The string representation of this parameter type.
|
| Constructor and Description |
|---|
MapPathParameter(@NotNull PathManager pathManager,
@NotNull ProjectSettings projectSettings)
Creates a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
@NotNull java.lang.String |
getParameterType()
Returns the parameter type name.
|
@NotNull java.lang.String |
getValue()
Returns the current value of this parameter.
|
@Nullable java.lang.String |
getValueOrNull()
Returns the current value of this parameter.
|
void |
setFile(@NotNull java.io.File file)
Sets the value from a
File instance. |
<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 MapPathParameter(@NotNull
@NotNull PathManager pathManager,
@NotNull
@NotNull ProjectSettings projectSettings)
pathManager - the path manager instance for converting files into
path namesprojectSettings - the project settings instance@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 java.lang.String getValue()
PluginParameter@Nullable public @Nullable java.lang.String getValueOrNull()
PluginParameternull if the the value is invalidpublic void setFile(@NotNull
@NotNull java.io.File file)
throws InvalidValueException
File instance.file - the file instanceInvalidValueException - if the file instance is invalid