- //Methods for closures
- def count(Closure Input) {
- threeAxises.count(Input)
- }
- def size() {
- threeAxises.size()
- }
- def each(Closure Input) {
- threeAxises.each(Input)
- }
- def sort(Closure Input) {
- threeAxises.sort(Input)
- }
- def find(Closure Input) {
- threeAxises.find(Input)
- }
- def collect(Closure Input) {
- threeAxises.collect(Input)
- }
-
- def currentState(String deviceFeature) {
- threeAxises[0].currentValue(deviceFeature)
- }
-
- def currentValue(String deviceFeature) {
- threeAxises[0].currentValue(deviceFeature)
- }
+ if (init)
+ threeAxis = [x:0, y:0, z:0]
+ else
+ threeAxis = [x:1, y:2, z:3]