Changeset 10 for party/src/main/java/geniusweb
- Timestamp:
- 01/28/20 10:19:54 (5 years ago)
- Location:
- party/src/main/java/geniusweb/party
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
party/src/main/java/geniusweb/party/Capabilities.java
r1 r10 5 5 import com.fasterxml.jackson.annotation.JsonAutoDetect; 6 6 import com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility; 7 8 import geniusweb.references.ProtocolRef;9 10 7 import com.fasterxml.jackson.annotation.JsonCreator; 11 8 import com.fasterxml.jackson.annotation.JsonProperty; … … 19 16 * List of supported protocols 20 17 */ 21 private final Set< ProtocolRef> protocols;18 private final Set<String> behaviours; 22 19 23 20 /** … … 26 23 */ 27 24 @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"); 31 28 } 32 this. protocols = protocols;29 this.behaviours = behaviours; 33 30 } 34 31 35 public Set< ProtocolRef> getProtocols() {36 return protocols;32 public Set<String> getBehaviours() { 33 return behaviours; 37 34 } 38 35 … … 42 39 int result = 1; 43 40 result = prime * result 44 + (( protocols == null) ? 0 : protocols.hashCode());41 + ((behaviours == null) ? 0 : behaviours.hashCode()); 45 42 return result; 46 43 } … … 55 52 return false; 56 53 Capabilities other = (Capabilities) obj; 57 if ( protocols == null) {58 if (other. protocols != null)54 if (behaviours == null) { 55 if (other.behaviours != null) 59 56 return false; 60 } else if (! protocols.equals(other.protocols))57 } else if (!behaviours.equals(other.behaviours)) 61 58 return false; 62 59 return true; … … 65 62 @Override 66 63 public String toString() { 67 return "Capabilities[" + " Protocols=" + protocols + "]";64 return "Capabilities[" + "Behaviours=" + behaviours + "]"; 68 65 } 69 66 -
party/src/main/java/geniusweb/party/inform/Inform.java
r1 r10 3 3 import com.fasterxml.jackson.annotation.JsonAutoDetect; 4 4 import com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility; 5 import com.fasterxml.jackson.annotation.JsonSubTypes; 6 import com.fasterxml.jackson.annotation.JsonTypeInfo; 5 7 6 8 import geniusweb.party.Party; 7 8 import com.fasterxml.jackson.annotation.JsonSubTypes;9 import com.fasterxml.jackson.annotation.JsonTypeInfo;10 9 11 10 /**
Note:
See TracChangeset
for help on using the changeset viewer.