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:
902 bytes
|
Line | |
---|
1 | package genius.core.actions;
|
---|
2 |
|
---|
3 | import javax.xml.bind.annotation.XmlElement;
|
---|
4 | import javax.xml.bind.annotation.XmlRootElement;
|
---|
5 |
|
---|
6 | import genius.core.AgentID;
|
---|
7 | import genius.core.Feedback;
|
---|
8 | import genius.core.protocol.MediatorFeedbackBasedProtocol;
|
---|
9 |
|
---|
10 | /**
|
---|
11 | * An agent can give feedback on other actions using this action. This action is
|
---|
12 | * used with the {@link MediatorFeedbackBasedProtocol}.
|
---|
13 | *
|
---|
14 | * @author Reyhan
|
---|
15 | */
|
---|
16 |
|
---|
17 | @XmlRootElement
|
---|
18 | public class GiveFeedback extends DefaultAction {
|
---|
19 |
|
---|
20 | @XmlElement
|
---|
21 | protected Feedback feedback;
|
---|
22 |
|
---|
23 | public GiveFeedback(AgentID party, Feedback feedback) {
|
---|
24 | super(party);
|
---|
25 | this.feedback = feedback;
|
---|
26 | }
|
---|
27 |
|
---|
28 | public Feedback getFeedback() {
|
---|
29 | return feedback;
|
---|
30 | }
|
---|
31 |
|
---|
32 | public String toString() {
|
---|
33 | return "Feedback: " + (feedback == null ? "null"
|
---|
34 | : (feedback == Feedback.BETTER ? "Better" : (feedback == Feedback.SAME ? "SAME" : "Worse")));
|
---|
35 | }
|
---|
36 |
|
---|
37 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.