Last change
on this file was 127, checked in by Wouter Pasman, 6 years ago |
#41 ROLL BACK of rev.126 . So this version is equal to rev. 125
|
File size:
791 bytes
|
Line | |
---|
1 | package genius.core.actions;
|
---|
2 |
|
---|
3 | import genius.core.AgentID;
|
---|
4 |
|
---|
5 | /**
|
---|
6 | * This action represents that the agent did an illegal action (not fitting the
|
---|
7 | * protocol), eg kill his agent. Immutable.
|
---|
8 | *
|
---|
9 | * @author W.Pasman 17sept08
|
---|
10 | */
|
---|
11 | public class IllegalAction extends DefaultAction {
|
---|
12 |
|
---|
13 | private String details;
|
---|
14 |
|
---|
15 | /**
|
---|
16 | * Specifies that an agent returned an action not fitting the protocol.
|
---|
17 | *
|
---|
18 | * @param agentID
|
---|
19 | * id of agent to blame.
|
---|
20 | * @param details
|
---|
21 | * of the error.
|
---|
22 | */
|
---|
23 | public IllegalAction(AgentID agentID, String details) {
|
---|
24 | super(agentID);
|
---|
25 | this.details = details;
|
---|
26 | }
|
---|
27 |
|
---|
28 | /**
|
---|
29 | * @return string representation of action: "(IllegalAction-DETAILS)".
|
---|
30 | */
|
---|
31 | public String toString() {
|
---|
32 | return "(IllegalAction- " + details + ")";
|
---|
33 | }
|
---|
34 | } |
---|
Note:
See
TracBrowser
for help on using the repository browser.