Package org.openhab.core.config.core
Class Configuration
java.lang.Object
org.openhab.core.config.core.Configuration
This class is a wrapper for configuration settings of
org.openhab.core.thing.Thing
s.- Author:
- Dennis Nobel - Initial contribution, Kai Kreuzer - added constructors and normalization, Gerhard Riegler - added converting BigDecimal values to the type of the configuration class field, Chris Jackson - fix concurrent modification exception when removing properties, Markus Rathgeb - add copy constructor, Michael Riess - fix concurrent modification exception when setting properties, Michael Riess - fix equals() implementation
-
Constructor Summary
ConstructorDescriptionConfiguration
(@Nullable Map<String, Object> properties) Create a new configuration.Configuration
(@Nullable Configuration configuration) Create a new configuration. -
Method Summary
Modifier and TypeMethodDescription<T> T
boolean
containsKey
(String key) Check if the given key is present in the configuration.boolean
int
hashCode()
keySet()
void
setProperties
(Map<String, Object> newProperties) toString()
values()
-
Constructor Details
-
Configuration
public Configuration() -
Configuration
Create a new configuration.The new configuration is initialized with the values of the given configuration.
- Parameters:
configuration
- the configuration that should be cloned (may be null)
-
Configuration
Create a new configuration.- Parameters:
properties
- the properties the configuration should be filled. If null, an empty configuration is created.
-
-
Method Details
-
as
-
containsKey
Check if the given key is present in the configuration.- Parameters:
key
- the key that existence should be checked- Returns:
- true if the key is part of the configuration, false if not
-
get
-
put
-
remove
-
keySet
-
values
-
getProperties
-
setProperties
-
hashCode
public int hashCode() -
equals
-
toString
-