Ignore:
Timestamp:
01/28/20 10:19:54 (4 years ago)
Author:
bart
Message:

Update 28 jan 2020

File:
1 edited

Legend:

Unmodified
Added
Removed
  • party/src/main/java/geniusweb/party/Capabilities.java

    r1 r10  
    55import com.fasterxml.jackson.annotation.JsonAutoDetect;
    66import com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility;
    7 
    8 import geniusweb.references.ProtocolRef;
    9 
    107import com.fasterxml.jackson.annotation.JsonCreator;
    118import com.fasterxml.jackson.annotation.JsonProperty;
     
    1916         * List of supported protocols
    2017         */
    21         private final Set<ProtocolRef> protocols;
     18        private final Set<String> behaviours;
    2219
    2320        /**
     
    2623         */
    2724        @JsonCreator
    28         public Capabilities(@JsonProperty("protocols") Set<ProtocolRef> protocols) {
    29                 if (protocols == null) {
    30                         throw new IllegalArgumentException("protocols==null");
     25        public Capabilities(@JsonProperty("behaviours") Set<String> behaviours) {
     26                if (behaviours == null) {
     27                        throw new IllegalArgumentException("behaviours==null");
    3128                }
    32                 this.protocols = protocols;
     29                this.behaviours = behaviours;
    3330        }
    3431
    35         public Set<ProtocolRef> getProtocols() {
    36                 return protocols;
     32        public Set<String> getBehaviours() {
     33                return behaviours;
    3734        }
    3835
     
    4239                int result = 1;
    4340                result = prime * result
    44                                 + ((protocols == null) ? 0 : protocols.hashCode());
     41                                + ((behaviours == null) ? 0 : behaviours.hashCode());
    4542                return result;
    4643        }
     
    5552                        return false;
    5653                Capabilities other = (Capabilities) obj;
    57                 if (protocols == null) {
    58                         if (other.protocols != null)
     54                if (behaviours == null) {
     55                        if (other.behaviours != null)
    5956                                return false;
    60                 } else if (!protocols.equals(other.protocols))
     57                } else if (!behaviours.equals(other.behaviours))
    6158                        return false;
    6259                return true;
     
    6562        @Override
    6663        public String toString() {
    67                 return "Capabilities[" + "Protocols=" + protocols + "]";
     64                return "Capabilities[" + "Behaviours=" + behaviours + "]";
    6865        }
    6966
Note: See TracChangeset for help on using the changeset viewer.