1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package org.apache.commons.scxml2.semantics;
18
19 import java.util.ArrayList;
20 import java.util.HashMap;
21 import java.util.HashSet;
22 import java.util.List;
23 import java.util.Map;
24 import java.util.Set;
25
26 import org.apache.commons.scxml2.TriggerEvent;
27 import org.apache.commons.scxml2.model.EnterableState;
28 import org.apache.commons.scxml2.model.History;
29 import org.apache.commons.scxml2.model.SimpleTransition;
30 import org.apache.commons.scxml2.model.TransitionalState;
31
32
33
34
35
36 public class Step {
37
38
39
40
41 private TriggerEvent event;
42
43
44
45
46 private Set<EnterableState> exitSet;
47
48
49
50
51 private Set<EnterableState> entrySet;
52
53
54
55
56 private Set<EnterableState> defaultEntrySet;
57
58
59
60
61 private Map<TransitionalState, SimpleTransition> defaultHistoryTransitions;
62
63
64
65
66 private Map<History, Set<EnterableState>> newHistoryConfigurations;
67
68
69
70
71 private List<SimpleTransition> transitList;
72
73
74
75
76 public Step(TriggerEvent event) {
77 this.event = event;
78 this.exitSet = new HashSet<EnterableState>();
79 this.entrySet = new HashSet<EnterableState>();
80 this.defaultEntrySet = new HashSet<EnterableState>();
81 this.defaultHistoryTransitions = new HashMap<TransitionalState, SimpleTransition>();
82 this.newHistoryConfigurations = new HashMap<History, Set<EnterableState>>();
83 this.transitList = new ArrayList<SimpleTransition>();
84 }
85
86
87
88
89 public void clearIntermediateState() {
90 exitSet.clear();
91 entrySet.clear();
92 defaultEntrySet.clear();
93 defaultHistoryTransitions.clear();
94 newHistoryConfigurations.clear();
95 }
96
97
98
99
100 public Set<EnterableState> getEntrySet() {
101 return entrySet;
102 }
103
104
105
106
107 public Set<EnterableState> getDefaultEntrySet() {
108 return defaultEntrySet;
109 }
110
111
112
113
114 public Map<TransitionalState, SimpleTransition> getDefaultHistoryTransitions() {
115 return defaultHistoryTransitions;
116 }
117
118
119
120
121 public Map<History, Set<EnterableState>> getNewHistoryConfigurations() {
122 return newHistoryConfigurations;
123 }
124
125
126
127
128 public Set<EnterableState> getExitSet() {
129 return exitSet;
130 }
131
132
133
134
135 public TriggerEvent getEvent() {
136 return event;
137 }
138
139
140
141
142 public List<SimpleTransition> getTransitList() {
143 return transitList;
144 }
145 }
146