Class MapConf
- java.lang.Object
-
- io.streamthoughts.azkarra.api.config.AbstractConf
-
- io.streamthoughts.azkarra.api.config.MapConf
-
- All Implemented Interfaces:
Conf
public class MapConf extends AbstractConf
-
-
Field Summary
Fields Modifier and Type Field Description protected Map<String,?>parameters
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleangetBoolean(String path)Gets a required parameter as an boolean.Map<String,Object>getConfAsMap()Converts thisConfinto a path-value map.PropertiesgetConfAsProperties()Converts thisConfinto a properties.doublegetDouble(String path)Gets a required parameter as a double.intgetInt(String path)Gets a required parameter as an integer.longgetLong(String path)Gets a required parameter as a long.StringgetString(String path)Gets a required parameter a a string.List<String>getStringList(String path)Gets a required parameter as a list.ConfgetSubConf(String path)Gets a required parameter as aConf.List<Conf>getSubConfList(String path)Gets a required parameter as a list ofConf.booleanhasPath(String path)Checks whether the specified path exists into thisConf.StringtoString()ConfwithFallback(Conf fallback)-
Methods inherited from class io.streamthoughts.azkarra.api.config.AbstractConf
getClass, getClasses
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface io.streamthoughts.azkarra.api.config.Conf
getOptionalBoolean, getOptionalDouble, getOptionalInt, getOptionalLong, getOptionalString
-
-
-
-
Method Detail
-
getString
public String getString(String path)
Gets a required parameter a a string.- Parameters:
path- the parameter path.- Returns:
- the parameter value as a string.
-
getLong
public long getLong(String path)
Gets a required parameter as a long.- Parameters:
path- the parameter path.- Returns:
- the parameter value as a long.
-
getInt
public int getInt(String path)
Gets a required parameter as an integer.- Parameters:
path- the parameter path.- Returns:
- the parameter value as a int.
-
getBoolean
public boolean getBoolean(String path)
Gets a required parameter as an boolean.- Parameters:
path- the parameter path.- Returns:
- the parameter value as a boolean.
-
getDouble
public double getDouble(String path)
Gets a required parameter as a double.- Parameters:
path- the parameter path.- Returns:
- the parameter value as a double.
-
getStringList
public List<String> getStringList(String path)
Gets a required parameter as a list.- Parameters:
path- the parameter path.- Returns:
- a string list value.
-
getSubConf
public Conf getSubConf(String path)
Gets a required parameter as aConf.- Parameters:
path- the parameter path.- Returns:
- a new
Confinstance.
-
getSubConfList
public List<Conf> getSubConfList(String path)
Gets a required parameter as a list ofConf.- Parameters:
path- the parameter path.- Returns:
- a new list of
Confinstances.
-
hasPath
public boolean hasPath(String path)
Checks whether the specified path exists into thisConf.- Parameters:
path- the path to be checked.- Returns:
trueif the path exists,falseotherwise.
-
getConfAsMap
public Map<String,Object> getConfAsMap()
Converts thisConfinto a path-value map.- Returns:
- a new
Mapinstance containing the configuration values.
-
getConfAsProperties
public Properties getConfAsProperties()
Converts thisConfinto a properties.- Returns:
- a new
Propertiesinstance containing the configuration values.
-
-