public class GlobalVariableUpdate
extends java.lang.Object
Constructor and Description |
---|
GlobalVariableUpdate(GlobalVariableContext ctx,
java.lang.Object newValue) |
GlobalVariableUpdate(GlobalVariableContext ctx,
java.lang.Object oldValue,
java.lang.Object newValue)
Constructor.
|
GlobalVariableUpdate(GlobalVariableContext ctx,
java.lang.Object oldValue,
java.lang.Object newValue,
long timestamp)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
GlobalVariableContext |
getContext()
Returns the device context associated with the update.
|
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 GlobalVariableUpdate(GlobalVariableContext ctx, java.lang.Object oldValue, java.lang.Object newValue)
ctx
- the device contextoldValue
- the previous variable valuenewValue
- the new variable valuepublic GlobalVariableUpdate(GlobalVariableContext ctx, java.lang.Object newValue)
public GlobalVariableUpdate(GlobalVariableContext 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 GlobalVariableContext getContext()
public java.lang.String getPluginId()
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.