2009/05/20 - Apache Shale has been retired.
For more information, please explore the Attic.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18 package org.apache.shale.dialog.basic.config;
19
20 import org.apache.shale.dialog.basic.model.Transition;
21
22 /***
23 * <p>{@link TransitionImpl} is a basic implementation of
24 * {@link Transition}.</p>
25 *
26 * @since 1.0.4
27 */
28
29 public final class TransitionImpl implements Transition {
30
31
32
33
34
35 /***
36 * <p>The logical outcome used to select this {@link Transition}.</p>
37 */
38 private String outcome = null;
39
40
41 /***
42 * <p>The identifier of the target {@link State} for this
43 * {@link Transition}.</p>
44 */
45 private String target = null;
46
47
48
49
50
51 /***
52 * {@inheritDoc}
53 */
54 public String getOutcome() {
55
56 return this.outcome;
57
58 }
59
60
61 /***
62 * {@inheritDoc}
63 */
64 public String getTarget() {
65
66 return this.target;
67
68 }
69
70
71
72
73
74 /***
75 * <p>Render a printable version of this instance.</p>
76 *
77 * @return The printable version of this instance
78 */
79 public String toString() {
80
81 return "Transition[outcome=" + this.outcome +
82 ",target=" + this.target + "]";
83
84 }
85
86
87
88
89
90 /***
91 * <p>Set the logical outcome used to select this {@link Transition}.</p>
92 *
93 * @param outcome New logical outcome
94 */
95 public void setOutcome(String outcome) {
96
97 this.outcome = outcome;
98
99 }
100
101
102 /***
103 * <p>Set the target {@link State} identifier for this
104 * {@link Transition}.</p>
105 *
106 * @param target New target identifier
107 */
108 public void setTarget(String target) {
109
110 this.target = target;
111
112 }
113
114
115 }