Package zombie.config
Class IntegerConfigOption
java.lang.Object
zombie.config.ConfigOption
zombie.config.IntegerConfigOption
- Direct Known Subclasses:
EnumConfigOption
,SandboxOptions.IntegerSandboxOption
,ServerOptions.IntegerServerOption
public class IntegerConfigOption extends ConfigOption
-
Field Summary
Fields Modifier and Type Field Description protected int
defaultValue
protected int
max
protected int
min
protected int
value
Fields inherited from class zombie.config.ConfigOption
name
-
Constructor Summary
Constructors Constructor Description IntegerConfigOption(java.lang.String name, int min, int max, int defaultValue)
-
Method Summary
Modifier and Type Method Description int
getDefaultValue()
double
getMax()
double
getMin()
java.lang.String
getType()
int
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(int 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 int value -
defaultValue
protected int defaultValue -
min
protected int min -
max
protected int max
-
-
Constructor Details
-
IntegerConfigOption
public IntegerConfigOption(java.lang.String name, int min, int max, int defaultValue)
-
-
Method Details
-
getType
public java.lang.String getType()- Specified by:
getType
in classConfigOption
-
resetToDefault
public void resetToDefault()- Specified by:
resetToDefault
in classConfigOption
-
getMin
public double getMin() -
getMax
public double getMax() -
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(int value) -
getValue
public int getValue() -
getDefaultValue
public int getDefaultValue()
-