(Box on, Dict.Prop<Boolean> property, boolean transitionTo, boolean defaultState, Dict.Prop<IdempotencyMap<Box.FunctionOfBox>> toTrue, Dict .Prop<IdempotencyMap<Box.FunctionOfBox>> toFalse)
| 77 | x.getValue().apply(from); |
| 78 | }); |
| 79 | } |
| 80 | |
| 81 | static public void transition(Box on, Dict.Prop<Boolean> property, boolean transitionTo, boolean defaultState, Dict.Prop<IdempotencyMap<Box.FunctionOfBox>> toTrue, Dict |
| 82 | .Prop<IdempotencyMap<Box.FunctionOfBox>> toFalse) { |
| 83 | boolean currentState = on.properties.isTrue(property, defaultState); |
| 84 | if (currentState == transitionTo) return; |
| 85 | |
| 86 | on.properties.put(property, transitionTo); |
| 87 | if (transitionTo) call(on, toTrue); |
| 88 | else call(on, toFalse); |
| 89 | } |
| 90 |
no test coverage detected