public class DeviceVariableUpdate
extends java.lang.Object
Constructor and Description |
---|
DeviceVariableUpdate(DeviceVariableContext ctx,
java.lang.Object newValue) |
DeviceVariableUpdate(DeviceVariableContext ctx,
java.lang.Object oldValue,
java.lang.Object newValue)
Constructor.
|
DeviceVariableUpdate(DeviceVariableContext ctx,
java.lang.Object oldValue,
java.lang.Object newValue,
long timestamp)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
DeviceVariableContext |
getContext()
Returns the device context associated with the update.
|
java.lang.String |
getDeviceId()
Returns the device ID that updated the variable.
|
java.lang.String |
getName()
Returns the variable name that has changed.
|
java.lang.Object |
getNewValue()
Returns the new variable value.
|
java.lang.Object |
getOldValue()
Returns the previous variable value.
|
java.lang.String |
getPluginId()
Returns the plugin ID that updated the variable.
|
long |
getTimestamp()
Returns the time the variable update occurred.
|
boolean |
hasNewValue()
Indicates whether this change has a new value.
|
boolean |
hasOldValue()
Indicates whether this change has an old value.
|
boolean |
isChanged()
Indicates if there is a difference between old and new values.
|
boolean |
isInitial()
Indicates if this is the first update for this variable (i.e.
|
java.lang.String |
toString() |
public DeviceVariableUpdate(DeviceVariableContext ctx, java.lang.Object newValue)
public DeviceVariableUpdate(DeviceVariableContext ctx, java.lang.Object oldValue, java.lang.Object newValue)
ctx
- the device contextoldValue
- the previous variable valuenewValue
- the new variable valuepublic DeviceVariableUpdate(DeviceVariableContext ctx, java.lang.Object oldValue, java.lang.Object newValue, long timestamp)
ctx
- the device contextoldValue
- the previous variable valuenewValue
- the new variable valuetimestamp
- the time the variable was updatedpublic DeviceVariableContext getContext()
public java.lang.String getPluginId()
public java.lang.String getDeviceId()
public java.lang.String getName()
public java.lang.Object getOldValue()
public java.lang.Object getNewValue()
public long getTimestamp()
public boolean hasOldValue()
public boolean hasNewValue()
public boolean isInitial()
public boolean isChanged()
public java.lang.String toString()
toString
in class java.lang.Object
Copyright © 2015 Whizzo Software LLC. All rights reserved.