D
- public class PropertiesDescriptor<D extends Device> extends Object implements HardwareDescriptor<D>
Map
.Constructor and Description |
---|
PropertiesDescriptor(String name)
Create an hardware descriptor with an empty set of empty properties
|
PropertiesDescriptor(String name,
Map<String,String> properties)
Create an hardware descriptor with set of properties
|
Modifier and Type | Method and Description |
---|---|
String |
getName()
Returns the name of this descriptor.
|
String |
getProperty(String propertyName)
Returns the value of the given property.
|
String[] |
getPropertyNames()
Returns a snapshot of available properties names for this descriptor.
|
String[] |
getPropertyValues()
Returns a snapshot of available properties values for this descriptor.
|
void |
setName(String name)
Sets the name.
|
void |
setProperty(String name,
String value)
Sets a property.
|
public PropertiesDescriptor(String name)
name
- the HardwareDescriptor
namepublic PropertiesDescriptor(String name, Map<String,String> properties)
name
- the HardwareDescriptor
nameproperties
- the map of [names,values]public String getName()
HardwareDescriptor
getName
in interface HardwareDescriptor<D extends Device>
Device.UNKNOWN_NAME
if its name is unavailable.public String getProperty(String propertyName)
HardwareDescriptor
getProperty
in interface HardwareDescriptor<D extends Device>
propertyName
- the property namepublic String[] getPropertyNames()
HardwareDescriptor
HardwareDescriptor.getProperty(String)
with properties returned by this method are not ensured to return a non null value.getPropertyNames
in interface HardwareDescriptor<D extends Device>
public String[] getPropertyValues()
HardwareDescriptor
getPropertyValues
in interface HardwareDescriptor<D extends Device>
public void setName(String name)
name
- the name to set.