Package zombie.config
Class DoubleConfigOption
java.lang.Object
zombie.config.ConfigOption
zombie.config.DoubleConfigOption
- Direct Known Subclasses:
SandboxOptions.DoubleSandboxOption
,ServerOptions.DoubleServerOption
public class DoubleConfigOption extends ConfigOption
-
Field Summary
Fields Modifier and Type Field Description protected double
defaultValue
protected double
max
protected double
min
protected double
value
Fields inherited from class zombie.config.ConfigOption
name
-
Constructor Summary
Constructors Constructor Description DoubleConfigOption(java.lang.String name, double min, double max, double defaultValue)
-
Method Summary
Modifier and Type Method Description double
getDefaultValue()
double
getMax()
double
getMin()
java.lang.String
getType()
double
getValue()
java.lang.Object
getValueAsObject()
java.lang.String
getValueAsString()
boolean
isValidString(java.lang.String s)
void
parse(java.lang.String s)
void
resetToDefault()
void
setDefaultToCurrentValue()
void
setValue(double value)
void
setValueFromObject(java.lang.Object o)
Methods inherited from class zombie.config.ConfigOption
getName
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Field Details
-
value
protected double value -
defaultValue
protected double defaultValue -
min
protected double min -
max
protected double max
-
-
Constructor Details
-
DoubleConfigOption
public DoubleConfigOption(java.lang.String name, double min, double max, double defaultValue)
-
-
Method Details
-
getType
public java.lang.String getType()- Specified by:
getType
in classConfigOption
-
getMin
public double getMin() -
getMax
public double getMax() -
resetToDefault
public void resetToDefault()- Specified by:
resetToDefault
in classConfigOption
-
setDefaultToCurrentValue
public void setDefaultToCurrentValue()- Specified by:
setDefaultToCurrentValue
in classConfigOption
-
parse
public void parse(java.lang.String s)- Specified by:
parse
in classConfigOption
-
getValueAsString
public java.lang.String getValueAsString()- Specified by:
getValueAsString
in classConfigOption
-
setValueFromObject
public void setValueFromObject(java.lang.Object o)- Specified by:
setValueFromObject
in classConfigOption
-
getValueAsObject
public java.lang.Object getValueAsObject()- Specified by:
getValueAsObject
in classConfigOption
-
isValidString
public boolean isValidString(java.lang.String s)- Specified by:
isValidString
in classConfigOption
-
setValue
public void setValue(double value) -
getValue
public double getValue() -
getDefaultValue
public double getDefaultValue()
-