Ignore:
Timestamp:
09/22/20 08:52:04 (4 years ago)
Author:
bart
Message:

Version 1.5.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • protocol/src/main/java/geniusweb/protocol/session/saop/SAOPSettings.java

    r10 r21  
    1010
    1111import geniusweb.deadline.Deadline;
     12import geniusweb.protocol.session.OnePartyTeam;
    1213import geniusweb.protocol.session.SessionProtocol;
    1314import geniusweb.protocol.session.SessionSettings;
     
    1718
    1819public class SAOPSettings implements SessionSettings {
    19         private final List<SaopPartyWithProfile> participants;
     20        private final List<OnePartyTeam> participants;
    2021        private final Deadline deadline;
    2122
     
    3031        @JsonCreator
    3132        public SAOPSettings(
    32                         @JsonProperty("participants") List<SaopPartyWithProfile> participants,
     33                        @JsonProperty("participants") List<OnePartyTeam> participants,
    3334                        @JsonProperty("deadline") Deadline deadline) {
    3435                this.participants = participants;
     
    111112        @Override
    112113        public SessionSettings with(TeamOfPartiesAndProfiles party) {
    113                 if (!(party instanceof SaopPartyWithProfile))
     114                if (!(party instanceof OnePartyTeam))
    114115                        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);
    119119                return new SAOPSettings(newparts, deadline);
    120120        }
Note: See TracChangeset for help on using the changeset viewer.