- Timestamp:
- 09/22/20 08:52:04 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
protocol/src/main/java/geniusweb/protocol/session/SessionResult.java
r20 r21 10 10 import com.fasterxml.jackson.annotation.JsonTypeInfo; 11 11 12 import geniusweb.i ssuevalue.Bid;12 import geniusweb.inform.Agreements; 13 13 import geniusweb.references.PartyWithProfile; 14 14 … … 20 20 public class SessionResult { 21 21 private final List<PartyWithProfile> participants; 22 private final Bid agreement;22 private final Agreements agreements; 23 23 private final List<Double> penalties; 24 24 … … 33 33 * never be null. Some of them may have entered later of 34 34 * left early. This list should contain them all. 35 * @param agreement the final agreement {@link Bid} of the session. Null 36 * if no agreement was reached. 35 * @param agreements the final Agreements. 37 36 * @param penalties the penalties in [0,1] for each participant, same 38 37 * order as the participants list. … … 48 47 public SessionResult( 49 48 @JsonProperty("participants") List<PartyWithProfile> participants, 50 @JsonProperty("agreement ") Bid agreement,49 @JsonProperty("agreements") Agreements agreements, 51 50 @JsonProperty("penalties") List<Double> penalties, 52 51 @JsonProperty("error") Throwable error) { 53 52 this.participants = participants; 54 this.agreement = agreement;53 this.agreements = agreements; 55 54 this.penalties = penalties; 56 55 this.error = error; … … 69 68 70 69 /** 71 * 8return the final agreement {@link Bid} of the session. Null if no72 * agreement was reached.70 * 8return the final {@link Agreements} of the session. May be empty, not 71 * null 73 72 */ 74 public Bid getAgreement() {75 return agreement ;73 public Agreements getAgreements() { 74 return agreements; 76 75 }; 77 76 … … 99 98 @Override 100 99 public String toString() { 101 return "SessionResult[" + participants + "," + agreement + ","100 return "SessionResult[" + participants + "," + agreements + "," 102 101 + penalties + "," + error + "]"; 103 102 } … … 108 107 int result = 1; 109 108 result = prime * result 110 + ((agreement == null) ? 0 : agreement.hashCode());109 + ((agreements == null) ? 0 : agreements.hashCode()); 111 110 result = prime * result + ((error == null) ? 0 : error.hashCode()); 112 111 result = prime * result … … 126 125 return false; 127 126 SessionResult other = (SessionResult) obj; 128 if (agreement == null) {129 if (other.agreement != null)127 if (agreements == null) { 128 if (other.agreements != null) 130 129 return false; 131 } else if (!agreement .equals(other.agreement))130 } else if (!agreements.equals(other.agreements)) 132 131 return false; 133 132 if (error == null) {
Note:
See TracChangeset
for help on using the changeset viewer.