1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18 package org.apache.commons.scxml.model;
19
20 import java.util.HashSet;
21 import java.util.Set;
22
23 /***
24 * The class in this SCXML object model that corresponds to the
25 * <parallel> SCXML element, which is a wrapper element to
26 * encapsulate parallel state machines. For the <parallel> element
27 * to be useful, each of its <state> substates must itself be
28 * complex, that is, one with either <state> or <parallel>
29 * children.
30 *
31 */
32 public class Parallel extends TransitionTarget {
33
34 /***
35 * The set of parallel state machines contained in this <parallel>.
36 */
37 private Set states;
38
39 /***
40 * Constructor.
41 */
42 public Parallel() {
43 this.states = new HashSet();
44 }
45
46 /***
47 * Get the set of parallel state machines contained in this Parallel.
48 *
49 * @return Returns the state.
50 */
51 public final Set getStates() {
52 return states;
53 }
54
55 /***
56 * Add a State to the list of parallel state machines contained
57 * in this Parallel.
58 *
59 * @param state The state to add.
60 */
61 public final void addState(final State state) {
62 if (state != null) {
63 this.states.add(state);
64 }
65 }
66
67 }
68