- Timestamp:
- 09/22/20 08:52:04 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
protocol/src/main/java/geniusweb/protocol/session/saop/SAOPSettings.java
r10 r21 10 10 11 11 import geniusweb.deadline.Deadline; 12 import geniusweb.protocol.session.OnePartyTeam; 12 13 import geniusweb.protocol.session.SessionProtocol; 13 14 import geniusweb.protocol.session.SessionSettings; … … 17 18 18 19 public class SAOPSettings implements SessionSettings { 19 private final List< SaopPartyWithProfile> participants;20 private final List<OnePartyTeam> participants; 20 21 private final Deadline deadline; 21 22 … … 30 31 @JsonCreator 31 32 public SAOPSettings( 32 @JsonProperty("participants") List< SaopPartyWithProfile> participants,33 @JsonProperty("participants") List<OnePartyTeam> participants, 33 34 @JsonProperty("deadline") Deadline deadline) { 34 35 this.participants = participants; … … 111 112 @Override 112 113 public SessionSettings with(TeamOfPartiesAndProfiles party) { 113 if (!(party instanceof SaopPartyWithProfile))114 if (!(party instanceof OnePartyTeam)) 114 115 throw new IllegalArgumentException( 115 "Added party must be SaopPartyWithProfile but got " 116 + party); 117 List<SaopPartyWithProfile> newparts = new LinkedList<>(participants); 118 newparts.add((SaopPartyWithProfile) party); 116 "Added party must be OnePartyTeam but got " + party); 117 List<OnePartyTeam> newparts = new LinkedList<>(participants); 118 newparts.add((OnePartyTeam) party); 119 119 return new SAOPSettings(newparts, deadline); 120 120 }
Note:
See TracChangeset
for help on using the changeset viewer.