Class EmptyConf
- java.lang.Object
-
- io.streamthoughts.azkarra.api.config.EmptyConf
-
-
Constructor Summary
Constructors Constructor Description EmptyConf()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
getBoolean(String key)
Gets a required parameter as an boolean.<T> T
getClass(String key, Class<T> type)
Gets a required parameter as an instances of typeConf
.<T> Collection<T>
getClasses(String key, Class<T> type)
Gets a required parameter as a list of instances of typeConf
.Map<String,Object>
getConfAsMap()
Converts thisConf
into a path-value map.Properties
getConfAsProperties()
Converts thisConf
into a properties.double
getDouble(String key)
Gets a required parameter as a double.int
getInt(String key)
Gets a required parameter as an integer.long
getLong(String key)
Gets a required parameter as a long.String
getString(String path)
Gets a required parameter a a string.List<String>
getStringList(String key)
Gets a required parameter as a list.Conf
getSubConf(String key)
Gets a required parameter as aConf
.List<Conf>
getSubConfList(String key)
Gets a required parameter as a list ofConf
.boolean
hasPath(String key)
Checks whether the specified path exists into thisConf
.Conf
withFallback(Conf fallback)
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface io.streamthoughts.azkarra.api.config.Conf
getOptionalBoolean, getOptionalDouble, getOptionalInt, getOptionalLong, getOptionalString
-
-
-
-
Method Detail
-
getLong
public long getLong(String key)
Gets a required parameter as a long.
-
getInt
public int getInt(String key)
Gets a required parameter as an integer.
-
getBoolean
public boolean getBoolean(String key)
Gets a required parameter as an boolean.- Specified by:
getBoolean
in interfaceConf
- Parameters:
key
- the parameter path.- Returns:
- the parameter value as a boolean.
-
getDouble
public double getDouble(String key)
Gets a required parameter as a double.
-
getStringList
public List<String> getStringList(String key)
Gets a required parameter as a list.- Specified by:
getStringList
in interfaceConf
- Parameters:
key
- the parameter path.- Returns:
- a string list value.
-
getSubConf
public Conf getSubConf(String key)
Gets a required parameter as aConf
.- Specified by:
getSubConf
in interfaceConf
- Parameters:
key
- the parameter path.- Returns:
- a new
Conf
instance.
-
getSubConfList
public List<Conf> getSubConfList(String key)
Gets a required parameter as a list ofConf
.- Specified by:
getSubConfList
in interfaceConf
- Parameters:
key
- the parameter path.- Returns:
- a new list of
Conf
instances.
-
hasPath
public boolean hasPath(String key)
Checks whether the specified path exists into thisConf
.
-
withFallback
public Conf withFallback(Conf fallback)
- Specified by:
withFallback
in interfaceConf
-
getClasses
public <T> Collection<T> getClasses(String key, Class<T> type)
Gets a required parameter as a list of instances of typeConf
.- Specified by:
getClasses
in interfaceConf
- Type Parameters:
T
- the expected type.- Parameters:
key
- the parameter path.type
- the class of the .- Returns:
- a new
Collection
ofConf
.
-
getClass
public <T> T getClass(String key, Class<T> type)
Gets a required parameter as an instances of typeConf
.- Specified by:
getClass
in interfaceConf
- Type Parameters:
T
- the expected type.- Parameters:
key
- the parameter path.type
- the class of the .- Returns:
- a new
Collection
ofConf
.
-
getConfAsMap
public Map<String,Object> getConfAsMap()
Converts thisConf
into a path-value map.- Specified by:
getConfAsMap
in interfaceConf
- Returns:
- a new
Map
instance containing the configuration values.
-
getConfAsProperties
public Properties getConfAsProperties()
Converts thisConf
into a properties.- Specified by:
getConfAsProperties
in interfaceConf
- Returns:
- a new
Properties
instance containing the configuration values.
-
-