Class ConfigManager
- java.lang.Object
-
- rs.kreme.ksbot.api.scripts.config.ConfigManager
-
public class ConfigManager extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description ConfigManager()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanasBoolean(java.lang.String key)Gets a configuration value as a boolean.doubleasDouble(java.lang.String key)Gets a configuration value as a double.intasInt(java.lang.String key)Gets a configuration value as an int.int[]asIntArray(java.lang.String key)java.lang.StringasString(java.lang.String key)Gets a configuration value as a String.java.lang.String[]asStringArray(java.lang.String key)java.lang.StringtoString(java.lang.Class<?> _class)
-
-
-
Method Detail
-
asInt
public int asInt(java.lang.String key)
Gets a configuration value as an int.- Parameters:
key- Key of the configuration.- Returns:
- The value as an int.
- Throws:
java.lang.IllegalArgumentException- If the value is not a number.
-
asString
public java.lang.String asString(java.lang.String key)
Gets a configuration value as a String.- Parameters:
key- Key of the configuration.- Returns:
- The value as a String.
-
asBoolean
public boolean asBoolean(java.lang.String key)
Gets a configuration value as a boolean.- Parameters:
key- Key of the configuration.- Returns:
- The value as a boolean.
-
asDouble
public double asDouble(java.lang.String key)
Gets a configuration value as a double.- Parameters:
key- Key of the configuration.- Returns:
- The value as a double.
- Throws:
java.lang.IllegalArgumentException- If the value is not a number.
-
asStringArray
public java.lang.String[] asStringArray(java.lang.String key)
-
asIntArray
public int[] asIntArray(java.lang.String key)
-
toString
public java.lang.String toString(java.lang.Class<?> _class)
-
-