Package net.sf.gridarta.plugin.parameter
Class AbstractValuePluginParameter<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>,V>
- java.lang.Object
-
- net.sf.gridarta.plugin.parameter.AbstractPluginParameter<G,A,R,V>
-
- net.sf.gridarta.plugin.parameter.AbstractValuePluginParameter<G,A,R,V>
-
- All Implemented Interfaces:
PluginParameter<G,A,R,V>
- Direct Known Subclasses:
BooleanParameter,DoubleParameter,IntegerParameter,StringParameter
public abstract class AbstractValuePluginParameter<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>,V> extends AbstractPluginParameter<G,A,R,V>
Abstract base class forPluginParameterimplementations for which the string representation of the value is calculated from the value.
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractValuePluginParameter(V value)Creates a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description VgetValue()Returns the current value of this parameter.VgetValueOrNull()Returns the current value of this parameter.voidsetValue(V value)Updates the parameter value.-
Methods inherited from class net.sf.gridarta.plugin.parameter.AbstractPluginParameter
addPluginParameterListener, changed, getDescription, getName, removePluginParameterListener, setDescription, setName
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface net.sf.gridarta.plugin.parameter.PluginParameter
getParameterType, getStringValue, setStringValue, visit
-
-
-
-
Constructor Detail
-
AbstractValuePluginParameter
protected AbstractValuePluginParameter(@NotNull V value)Creates a new instance.- Parameters:
value- the initial value
-
-
Method Detail
-
getValue
@NotNull public V getValue()
Description copied from interface:PluginParameterReturns the current value of this parameter.- Returns:
- the value
-
getValueOrNull
@NotNull public V getValueOrNull()
Description copied from interface:PluginParameterReturns the current value of this parameter.- Returns:
- the value or
nullif the the value is invalid
-
setValue
public void setValue(@NotNull V value)Updates the parameter value.- Parameters:
value- the new value
-
-