private void addExitActions(SemanticState exitState) { List<SemanticState> hierarchy = new ArrayList<>(); addAllStatesInHiearchyLeafFirst(exitState, hierarchy); Collections.reverse(hierarchy); for (SemanticState superState : hierarchy) { subTransition.actions.addAll(superState.exitActions); } }
private List<SemanticState> makeRootFirstHierarchyOfStates() { List<SemanticState> hierarchy = new ArrayList<>(); addAllStatesInHiearchyLeafFirst(currentState, hierarchy); Collections.reverse(hierarchy); return hierarchy; }