public class DeviceSetting
extends java.lang.Object
implements java.lang.Cloneable, java.io.Serializable
Constructor and Description |
---|
DeviceSetting()
Default constructor.
|
DeviceSetting(DeviceSetting deviceSetting)
Clone constructor.
|
DeviceSetting(java.lang.String device,
java.lang.String property,
float value)
Constructor already initializing the setting.
|
DeviceSetting(java.lang.String device,
java.lang.String property,
int value)
Constructor already initializing the setting.
|
DeviceSetting(java.lang.String device,
java.lang.String property,
java.lang.String value)
Constructor already initializing the setting.
|
Modifier and Type | Method and Description |
---|---|
DeviceSetting |
clone() |
boolean |
equals(java.lang.Object obj) |
java.lang.String |
getDevice()
Returns the device of which a property should be changed.
|
float |
getFloatValue()
Returns the value of the setting as a float.
|
int |
getIntegerValue()
Returns the value of the setting as an integer.
|
java.lang.String |
getProperty()
Returns the property of the device which should be changed.
|
java.lang.String |
getStringValue()
Returns the value of the setting as a string.
|
int |
hashCode() |
boolean |
isAbsoluteValue()
Returns true if the property should be set to the given value,
and false if it should be changed for an offset relative to the current value.
|
void |
setAbsoluteValue(boolean absoluteValue)
Set to true if the property should be set to the given value,
and to false if it should be changed for an offset relative to the current value.
|
void |
setDeviceProperty(java.lang.String device,
java.lang.String property)
Sets the device property which this setting represents.
|
void |
setRelativeValue(float offset)
Sets the current value of the setting relative to its previous value.
|
void |
setRelativeValue(int offset)
Sets the current value of the setting relative to its previous value.
|
void |
setValue(float value)
Sets the current value of the setting.
|
void |
setValue(int value)
Sets the current value of the setting.
|
void |
setValue(java.lang.String value)
Sets the current value of the setting.
|
java.lang.String |
toString() |
public DeviceSetting()
public DeviceSetting(java.lang.String device, java.lang.String property, java.lang.String value)
device
- the device to set.property
- the property to set.value
- the value to set.public DeviceSetting(java.lang.String device, java.lang.String property, int value)
device
- the device to set.property
- the property to set.value
- the value to set.public DeviceSetting(java.lang.String device, java.lang.String property, float value)
device
- the device to set.property
- the property to set.value
- the value to set.public DeviceSetting(DeviceSetting deviceSetting)
deviceSetting
- The device setting to clone.public DeviceSetting clone()
clone
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public void setDeviceProperty(java.lang.String device, java.lang.String property)
device
- the device to set.property
- the property to set.public java.lang.String getDevice()
public java.lang.String getProperty()
public void setValue(java.lang.String value)
value
- the value to set.public void setValue(int value)
value
- the value to set.public void setValue(float value)
value
- the value to set.public void setRelativeValue(float offset) throws java.lang.NumberFormatException
offset
- the offset to set.java.lang.NumberFormatException
public void setRelativeValue(int offset) throws java.lang.NumberFormatException
offset
- the offset to set.java.lang.NumberFormatException
public java.lang.String getStringValue()
public int getIntegerValue() throws java.lang.NumberFormatException
java.lang.NumberFormatException
public float getFloatValue() throws java.lang.NumberFormatException
java.lang.NumberFormatException
public void setAbsoluteValue(boolean absoluteValue)
absoluteValue
- true if the property should be changed absolutely.public boolean isAbsoluteValue()