Changeset 24 for events/src/main/java
- Timestamp:
- 10/06/20 13:12:20 (4 years ago)
- Location:
- events/src/main/java/geniusweb
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
events/src/main/java/geniusweb/actions/Votes.java
r21 r24 57 57 * with power at most P. 58 58 * 59 * @param otherVotes 59 * @param otherVotes the {@link Votes}, usually from a previous round, that 60 * this should extend. 60 61 * @return true iff this extends the otherVotes. 61 62 */ … … 65 66 for (Vote vote : otherVotes.getVotes()) { 66 67 Vote myvote = getVote(vote.getBid()); 67 if (myvote == null) 68 return false; 69 if (myvote.getMinPower() > vote.getMinPower()) 68 if (myvote == null || myvote.getMinPower() > vote.getMinPower() 69 || myvote.getMaxPower() < vote.getMaxPower()) 70 70 return false; 71 71 } -
events/src/main/java/geniusweb/events/ActionEvent.java
r1 r24 18 18 /** 19 19 * 20 * @param action 20 * @param action the {@link Action} that was done 21 21 * @param time the current time to use. see 22 22 * {@link System#currentTimeMillis()}. -
events/src/main/java/geniusweb/events/NegotiationEvent.java
r1 r24 6 6 import com.fasterxml.jackson.annotation.JsonTypeInfo; 7 7 import com.fasterxml.jackson.annotation.JsonTypeInfo.As; 8 9 import geniusweb.actions.Action; 8 10 9 11 /** -
events/src/main/java/geniusweb/inform/Agreements.java
r21 r24 51 51 52 52 /** 53 * @param bid 54 * @param parties 53 * @param bid a {@link Bid} to be added 54 * @param parties {@link Set} of the {@link PartyId}s that accepted the bid 55 55 * @return new Agreements, with the new bid/parties added. 56 56 */ -
events/src/main/java/geniusweb/inform/Finished.java
r21 r24 15 15 * The session finished (can be for any reason). 16 16 * 17 * @param agreedBid the bid that was finally agreed on; null if no 18 * agreement. 17 * @param agreements the {@link Agreements} that were finally agreed on. 19 18 */ 20 19 @JsonCreator 21 20 public Finished(@JsonProperty("agreements") Agreements agreements) { 21 if (agreements == null) 22 throw new NullPointerException("Agreements can't be null"); 22 23 this.agreements = agreements; 23 24 } -
events/src/main/java/geniusweb/inform/Inform.java
r21 r24 7 7 8 8 /** 9 * base class of all information sent to the {@link Party}9 * base class of all information sent to a Party 10 10 */ 11 11 @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.WRAPPER_OBJECT) -
events/src/main/java/geniusweb/inform/Settings.java
r21 r24 2 2 3 3 import java.util.HashMap; 4 import java.util.Map; 4 5 5 6 import com.fasterxml.jackson.annotation.JsonCreator; … … 13 14 14 15 /** 15 * Informs a {@link Party} about all settings for the upcoming negotiation 16 * session. This should be sent to a party one time, so that the party knows the 17 * situation. 16 * Informs a Party about all settings for the upcoming negotiation session. This 17 * should be sent to a party one time, so that the party knows the situation. 18 18 * 19 19 */ … … 31 31 * @param protocol the protocol used in this session 32 32 * @param progress the {@link Progress} object used for this session 33 * @param parameters a Map<String, Object> containing initialization34 * parameters for this party. The Object can be a HashMap,35 * ArrayList, String, or number (Integer, Double, etc).36 * The Object should not be just any Object because37 * deserialization will work only with the mentioned38 * t ypes.33 * @param parameters a {@link Map} <String, Object> containing 34 * initialization parameters for this party. The Object 35 * can be a HashMap, ArrayList, String, or number 36 * (Integer, Double, etc). The Object should not be just 37 * any Object because deserialization will work only with 38 * the mentioned types. 39 39 */ 40 40 @JsonCreator … … 85 85 /** 86 86 * 87 * @return a HashMap<String,Object> containing initialization parameters88 * that can be used by the party.87 * @return a {@link HashMap}<String,Object> containing initialization 88 * parameters that can be used by the party. 89 89 */ 90 90 public HashMap<String, Object> getParameters() {
Note:
See TracChangeset
for help on using the changeset viewer.