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 string, int int1, int int2, int int3)
-
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 string)
void
parse(java.lang.String string)
void
resetToDefault()
void
setDefaultToCurrentValue()
void
setValue(int int1)
void
setValueFromObject(java.lang.Object object)
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 string, int int1, int int2, int int3)
-
-
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 string)- Specified by:
parse
in classConfigOption
-
getValueAsString
public java.lang.String getValueAsString()- Specified by:
getValueAsString
in classConfigOption
-
setValueFromObject
public void setValueFromObject(java.lang.Object object)- Specified by:
setValueFromObject
in classConfigOption
-
getValueAsObject
public java.lang.Object getValueAsObject()- Specified by:
getValueAsObject
in classConfigOption
-
isValidString
public boolean isValidString(java.lang.String string)- Specified by:
isValidString
in classConfigOption
-
setValue
public void setValue(int int1) -
getValue
public int getValue() -
getDefaultValue
public int getDefaultValue()
-