Interface ConfigurationMap
-
- All Known Implementing Classes:
DefaultConfigurationMap
public interface ConfigurationMapA collection of key-value pairs, with an additional mapping for values.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description <T> Optional<T>get(String key, Class<T> clazz)Returns the value stored under the provided key and maps it to the provided class.intsize()Returns the number of existing keys in the configuration
-
-
-
Method Detail
-
get
<T> Optional<T> get(String key, Class<T> clazz)
Returns the value stored under the provided key and maps it to the provided class. If the key is not found in the map - an empty Optional is returned.- Type Parameters:
T- type of the provided class- Parameters:
key- key under which the value is storedclazz- a class to which the value will be mapped- Returns:
- an object of a given class, created by mapping the value
-
size
int size()
Returns the number of existing keys in the configuration- Returns:
- the number of existing keys
-
-