MCPcopy Create free account
hub / github.com/OpenEndedGroup/Field2 / transition

Method transition

src/main/java/fieldbox/boxes/Callbacks.java:79–87  ·  view source on GitHub ↗
(Box on, Dict.Prop<Boolean> property, boolean transitionTo, boolean defaultState, Dict.Prop<IdempotencyMap<Box.FunctionOfBox>> toTrue, Dict
		.Prop<IdempotencyMap<Box.FunctionOfBox>> toFalse)

Source from the content-addressed store, hash-verified

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

Callers 15

DefaultMenusMethod · 0.95
button0Method · 0.95
setSelectionToMethod · 0.95
DirectionalityMethod · 0.95
selRightMethod · 0.95
selAllRightMethod · 0.95
selLeftMethod · 0.95
selAllLeftMethod · 0.95
selAboveMethod · 0.95
selAllAboveMethod · 0.95
selBelowMethod · 0.95
selAllBelowMethod · 0.95

Calls 3

callMethod · 0.95
isTrueMethod · 0.80
putMethod · 0.45

Tested by

no test coverage detected