- java.lang.Object
-
- com.appslandia.common.base.ConfigWrapper
-
-
Constructor Summary
Constructors Constructor Description ConfigWrapper(Config cfg)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleangetBool(String key, boolean defaultValue)doublegetDouble(String key, double defaultValue)StringgetFormatted(String key)StringgetFormatted(String key, Object... parameters)StringgetFormatted(String key, Map<String,Object> parameters)intgetInt(String key, int defaultValue)longgetLong(String key, long defaultValue)booleangetRequiredBool(String key)doublegetRequiredDouble(String key)StringgetRequiredFormatted(String key)StringgetRequiredFormatted(String key, Object... parameters)StringgetRequiredFormatted(String key, Map<String,Object> parameters)intgetRequiredInt(String key)longgetRequiredLong(String key)StringgetRequiredString(String key)StringgetString(String key)StringgetString(String key, String defaultValue)String[]getStringArray(String key)
-
-
-
Constructor Detail
-
ConfigWrapper
public ConfigWrapper(Config cfg)
-
-
Method Detail
-
getRequiredString
public String getRequiredString(String key) throws IllegalStateException
- Specified by:
getRequiredStringin interfaceConfig- Throws:
IllegalStateException
-
getStringArray
public String[] getStringArray(String key)
- Specified by:
getStringArrayin interfaceConfig
-
getFormatted
public String getFormatted(String key)
- Specified by:
getFormattedin interfaceConfig
-
getRequiredFormatted
public String getRequiredFormatted(String key) throws IllegalStateException
- Specified by:
getRequiredFormattedin interfaceConfig- Throws:
IllegalStateException
-
getFormatted
public String getFormatted(String key, Map<String,Object> parameters)
- Specified by:
getFormattedin interfaceConfig
-
getRequiredFormatted
public String getRequiredFormatted(String key, Map<String,Object> parameters) throws IllegalStateException
- Specified by:
getRequiredFormattedin interfaceConfig- Throws:
IllegalStateException
-
getFormatted
public String getFormatted(String key, Object... parameters) throws IllegalStateException
- Specified by:
getFormattedin interfaceConfig- Throws:
IllegalStateException
-
getRequiredFormatted
public String getRequiredFormatted(String key, Object... parameters) throws IllegalStateException
- Specified by:
getRequiredFormattedin interfaceConfig- Throws:
IllegalStateException
-
getBool
public boolean getBool(String key, boolean defaultValue)
-
getRequiredBool
public boolean getRequiredBool(String key) throws IllegalStateException, BoolFormatException
- Specified by:
getRequiredBoolin interfaceConfig- Throws:
IllegalStateExceptionBoolFormatException
-
getRequiredInt
public int getRequiredInt(String key) throws IllegalStateException, NumberFormatException
- Specified by:
getRequiredIntin interfaceConfig- Throws:
IllegalStateExceptionNumberFormatException
-
getLong
public long getLong(String key, long defaultValue)
-
getRequiredLong
public long getRequiredLong(String key) throws IllegalStateException, NumberFormatException
- Specified by:
getRequiredLongin interfaceConfig- Throws:
IllegalStateExceptionNumberFormatException
-
getDouble
public double getDouble(String key, double defaultValue)
-
getRequiredDouble
public double getRequiredDouble(String key) throws IllegalStateException, NumberFormatException
- Specified by:
getRequiredDoublein interfaceConfig- Throws:
IllegalStateExceptionNumberFormatException
-
-