projects
/
smartthings-infrastructure.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Removing getXXX methods + properties. Adding getProperty feature to SmartThing(s)
[smartthings-infrastructure.git]
/
MobilePresence
/
MobilePresence.groovy
diff --git
a/MobilePresence/MobilePresence.groovy
b/MobilePresence/MobilePresence.groovy
index 7e6ff0a7f6a02d5d4b3c3f6fd61d31c6f2a92010..ddc1ba47a60dec0e8c5ef7b2e29158fff5cc9161 100644
(file)
--- a/
MobilePresence/MobilePresence.groovy
+++ b/
MobilePresence/MobilePresence.groovy
@@
-4,16
+4,13
@@
import SmartThing.SmartThing
public class MobilePresence extends SmartThing {
// id, label, and display name of the device
public class MobilePresence extends SmartThing {
// id, label, and display name of the device
- StringBuilder id = new StringBuilder()
- StringBuilder label = new StringBuilder()
- StringBuilder displayName = new StringBuilder()
- // Features with string values
- StringBuilder deviceNetworkId = new StringBuilder()
+ String id
+ String label
+ String displayName
// Maps from features to values
// Maps from features to values
- HashMap<String, String
Builder> deviceValuesMap = new HashMap<String, StringBuilder
>()
+ HashMap<String, String
> deviceValuesMap = new HashMap<String, String
>()
-
- MobilePresence(Closure sendEvent, StringBuilder id, StringBuilder label, StringBuilder displayName, StringBuilder deviceNetworkId) {
+ MobilePresence(Closure sendEvent, String id, String label, String displayName, String deviceNetworkId) {
deviceValuesMap = deviceValueSmartThing
idSmartThing = id
labelSmartThing = label
deviceValuesMap = deviceValueSmartThing
idSmartThing = id
labelSmartThing = label
@@
-24,13
+21,7
@@
public class MobilePresence extends SmartThing {
this.id = id
this.label = label
this.displayName = displayName
this.id = id
this.label = label
this.displayName = displayName
- this.deviceNetworkId = deviceNetworkId
deviceValuesMap.put("deviceNetworkId", deviceNetworkId)
}
deviceValuesMap.put("deviceNetworkId", deviceNetworkId)
}
-
- // Methods to return values
- def getDeviceNetworkId() {
- return deviceNetworkId.toString()
- }
}
}