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:
704 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.Vote;
|
---|
8 |
|
---|
9 | /**
|
---|
10 | * This action can be used to indicate accept or reject of an offer. immutable
|
---|
11 | *
|
---|
12 | * @author Reyhan
|
---|
13 | */
|
---|
14 |
|
---|
15 | @XmlRootElement
|
---|
16 | public class VoteForOfferAcceptance extends DefaultAction {
|
---|
17 |
|
---|
18 | @XmlElement
|
---|
19 | protected Vote vote;
|
---|
20 |
|
---|
21 | public VoteForOfferAcceptance(AgentID party, Vote vote) {
|
---|
22 | super(party);
|
---|
23 | this.vote = vote;
|
---|
24 | }
|
---|
25 |
|
---|
26 | public Vote getVote() {
|
---|
27 | return vote;
|
---|
28 | }
|
---|
29 |
|
---|
30 | public String toString() {
|
---|
31 | return "Vote: " + (vote == null ? "null" : (vote == Vote.ACCEPT ? "Accept" : "Reject"));
|
---|
32 | }
|
---|
33 |
|
---|
34 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.