20 package net.sf.gridarta.plugin.parameter;
25 import org.jetbrains.annotations.NotNull;
48 private double max = 1.0;
60 return visitor.visit(
this);
65 final double doubleValue;
67 doubleValue = Double.parseDouble(stringValue);
68 }
catch (
final NumberFormatException ignored) {
71 if (doubleValue < min) {
74 if (doubleValue > max) {
85 super.setValue(Math.max(Math.min(value, max),
min));
113 final double newMax = Math.max(min, max);
114 if (this.max == newMax) {
137 final double newMin = Math.min(min, max);
138 if (this.min == newMin) {
DoubleParameter()
Creates a new instance.
void setValue(@NotNull final Double value)
void setMin(final double min)
Sets the minimal allowed value.
double getMin()
Returns the minimal allowed value.
double min
The minimal allowed value.
Abstract base class for PluginParameter implementations for which the string representation of the va...
Base package of all Gridarta classes.
String getParameterType()
V value
The current value.
Reflects a game object (object on a map).
double max
The maximal allowed value.
GameObjects are the objects based on Archetypes found on maps.
void setMax(final double max)
Sets the maximal allowed value.
Interface for visitors of PluginParameter instances.
A PluginParameter that holds a double value.
boolean setStringValue(@NotNull final String stringValue)
double getMax()
Returns the maximal allowed value.
Interface for MapArchObjects.
static final String PARAMETER_TYPE
The string representation of this parameter type.