mirror of
https://github.com/danieldemus/openhab-core.git
synced 2025-01-11 13:41:53 +01:00
Update Metadata.java (#704)
Fixes #699 Signed-off-by: David Gräff <david.graeff@web.de>
This commit is contained in:
parent
02208f487a
commit
7838a6a46f
@ -25,7 +25,7 @@ import org.eclipse.smarthome.core.common.registry.Identifiable;
|
||||
* This is a data class for storing meta-data for a given item and namespace.
|
||||
* It is the entity used for within the {@link MetadataRegistry}.
|
||||
*
|
||||
* @author Kai Kreuzer - Initial contribution and API
|
||||
* @author Kai Kreuzer - Initial contribution
|
||||
*
|
||||
*/
|
||||
@NonNullByDefault
|
||||
@ -35,6 +35,17 @@ public final class Metadata implements Identifiable<MetadataKey> {
|
||||
private final String value;
|
||||
private final Map<String, Object> configuration;
|
||||
|
||||
/**
|
||||
* Package protected default constructor to allow reflective instantiation.
|
||||
*
|
||||
* !!! DO NOT REMOVE - Gson needs it !!!
|
||||
*/
|
||||
Metadata() {
|
||||
key = new MetadataKey("", "");
|
||||
value = "";
|
||||
configuration = Collections.emptyMap();
|
||||
}
|
||||
|
||||
public Metadata(MetadataKey key, String value, @Nullable Map<String, Object> configuration) {
|
||||
this.key = key;
|
||||
this.value = value;
|
||||
|
Loading…
Reference in New Issue
Block a user