public class KeyDeviceInfo extends DefaultDeviceInfo
Constructor and Description |
---|
KeyDeviceInfo(DefaultDeviceInfo ddi)
DefaultDeviceInfo copy constructor
|
KeyDeviceInfo(DefaultDeviceType deviceType) |
KeyDeviceInfo(KeyDeviceInfo kdi)
KeyDeviceInfo copy constructor
|
Modifier and Type | Method and Description |
---|---|
void |
clear(String key)
Clears the property for the given key.
|
String |
exportData()
Export device keys and parent data in json format.
|
boolean |
importData(String data)
Import device keys and parent data from json format.
|
Key |
key(Key.Type type)
Get the key by type.
|
void |
remove(Key.Type type)
Remove the key type.
|
void |
set(String key,
boolean value)
Sets the given boolean value for the given key.
|
void |
set(String key,
int value)
Sets the given value for the given key.
|
void |
set(String key,
long value)
Sets the given value for the given key.
|
void |
set(String key,
String value)
Sets the given value for the given key.
|
void |
setKey(Key key)
Store the key.
|
evolve, get, get, getBoolean, getBoolean, getGeneration, getInt, getInt, getLong, getLong, getNodeCount, hasProperty, incrementGeneration, keys, toDebugString, toString
getDeviceType, getFacet, getFacetClasses, getFacetClassNames, getType, getTypeName, isSupported, setDeviceType
public KeyDeviceInfo(DefaultDeviceType deviceType)
public KeyDeviceInfo(KeyDeviceInfo kdi)
kdi
- key device info to copypublic KeyDeviceInfo(DefaultDeviceInfo ddi)
ddi
- default device info to copypublic Key key(Key.Type type)
type
- Key.TYPEpublic void setKey(Key key)
key
- device key, type will be read from keypublic void remove(Key.Type type)
type
- key typepublic String exportData()
exportData
in interface DeviceInfo
exportData
in class DefaultDeviceInfo
DeviceInfo.importData(String)
public boolean importData(String data)
importData
in interface DeviceInfo
importData
in class DefaultDeviceInfo
data
- string previously encoded via DeviceInfo.exportData()
public void set(String key, String value)
DefaultDeviceInfo
set
in class DefaultDeviceInfo
key
- the keyvalue
- the valuepublic void set(String key, int value)
DefaultDeviceInfo
set
in class DefaultDeviceInfo
key
- the keyvalue
- the valuepublic void set(String key, long value)
DefaultDeviceInfo
set
in class DefaultDeviceInfo
key
- the keyvalue
- the valuepublic void set(String key, boolean value)
DefaultDeviceInfo
set
in class DefaultDeviceInfo
key
- the keyvalue
- the valuepublic void clear(String key)
DefaultDeviceInfo
AbstractHierarchicalFileConfiguration.setProperty(String, Object)
clear
in class DefaultDeviceInfo
key
- the keyCopyright © 2015. All Rights Reserved.