- Timestamp:
- 12/20/11 13:37:14 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/EventBenchCore/src/de/ugoe/cs/eventbench/data/Event.java
r335 r336 96 96 if (other instanceof Event<?>) { 97 97 Event<?> otherEvent = (Event<?>) other; 98 if (target != null) { 99 return type.equals(otherEvent.type) 100 && target.equals(otherEvent.target); 98 if (otherEvent.canEqual(this)) { 99 if (type != null && target != null) { 100 return type.equals(otherEvent.type) 101 && target.equals(otherEvent.target); 102 } else if (type != null && target == null) { 103 return type.equals(otherEvent.type) 104 && otherEvent.target == null; 105 } else if (type == null && target != null) { 106 return otherEvent.type == null 107 && target.equals(otherEvent.target); 108 } else { 109 return otherEvent.type == null && otherEvent.target == null; 110 } 101 111 } else { 102 return type.equals(otherEvent.type) 103 && otherEvent.target == null; 112 return false; 104 113 } 105 114 } else { 106 115 return false; 107 116 } 117 } 118 119 public boolean canEqual(Object other) { 120 return (other instanceof Event<?>); 108 121 } 109 122 … … 216 229 int multiplier = 17; 217 230 int hash = 42; 218 hash = multiplier * hash + type.hashCode(); 231 if (type != null) { 232 hash = multiplier * hash + type.hashCode(); 233 } 219 234 if (target != null) { 220 235 hash = multiplier * hash + target.hashCode();
Note: See TracChangeset
for help on using the changeset viewer.