Rev 15 | Only display areas with differences | Regard whitespace | Details | Blame | Last modification | View Log | SVN | RSS feed
| Rev 15 | Rev 73 | ||
|---|---|---|---|
| 1 | /* |
1 | /* |
| 2 | * File created by Jimmy |
2 | * File created by Jimmy |
| 3 | * at 2004-jun-09 18:52:31 |
3 | * at 2004-jun-09 18:52:31 |
| 4 | */ |
4 | */ |
| 5 | package Macbeth.System; |
5 | package Macbeth.System; |
| 6 | 6 | ||
| 7 | /** |
7 | /** |
| 8 | * This class represents a Macbeth Action, that is an action |
8 | * This class represents a Macbeth Action, that is an action |
| 9 | * that can be performed by the system. |
9 | * that can be performed by the system. |
| 10 | * |
10 | * |
| 11 | * @author Jimmy |
11 | * @author Jimmy |
| 12 | */ |
12 | */ |
| 13 | public class MbAction { |
13 | public class MbAction { |
| 14 | 14 | ||
| 15 | //the action string (OWNER.ACTIONNAME) |
15 | //the action string (OWNER.ACTIONNAME) |
| 16 | private String actionString; |
16 | private String actionString; |
| 17 | //the action parameters (comma-separated) |
17 | //the action parameters (comma-separated) |
| 18 | private String parameters; |
18 | private String parameters; |
| 19 | 19 | ||
| 20 | /** |
20 | /** |
| 21 | * Creates a new instance of MbAction. |
21 | * Creates a new instance of MbAction. |
| 22 | * |
22 | * |
| 23 | * @param name The actionString of the action. |
23 | * @param name The actionString of the action. |
| 24 | * @param parameters The action parameters. |
24 | * @param parameters The action parameters. |
| 25 | */ |
25 | */ |
| 26 | public MbAction(String name, String parameters) { |
26 | public MbAction(String name, String parameters) { |
| 27 | this.actionString = name; |
27 | this.actionString = name; |
| 28 | this.parameters = parameters; |
28 | this.parameters = parameters; |
| 29 | } |
29 | } |
| 30 | 30 | ||
| 31 | /** |
31 | /** |
| 32 | * Creates a new instance of MbAction. |
32 | * Creates a new instance of MbAction. |
| 33 | */ |
33 | */ |
| 34 | public MbAction() { |
34 | public MbAction() { |
| 35 | this(null, null); |
35 | this(null, null); |
| 36 | } |
36 | } |
| 37 | 37 | ||
| 38 | public String getActionString() { |
38 | public String getActionString() { |
| 39 | return actionString; |
39 | return actionString; |
| 40 | } |
40 | } |
| 41 | 41 | ||
| 42 | public String getParameters() { |
42 | public String getParameters() { |
| 43 | return parameters; |
43 | return parameters; |
| 44 | } |
44 | } |
| 45 | 45 | ||
| 46 | public String toString() { |
46 | public String toString() { |
| 47 | return actionString + "(" + parameters + ")"; |
47 | return actionString + "(" + parameters + ")"; |
| 48 | } |
48 | } |
| 49 | 49 | ||
| 50 | } |
50 | } |
| 51 | 51 | ||