Changeset 405 for trunk/EventBenchCore
- Timestamp:
- 04/03/12 10:15:39 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/EventBenchCore/src/de/ugoe/cs/eventbench/data/ReplayableEvent.java
r336 r405 160 160 this.decorator = decorator; 161 161 } 162 163 /*164 * (non-Javadoc)165 *166 * @see de.ugoe.cs.eventbench.data.Event#equals(java.lang.Object)167 */168 @Override169 public boolean equals(Object other) {170 if (this == other) {171 return true;172 }173 if (other instanceof ReplayableEvent<?>) {174 ReplayableEvent<?> otherEvent = (ReplayableEvent<?>) other;175 if (replayEvents != null) {176 return super.equals(otherEvent)177 && replayEvents.equals(otherEvent.replayEvents)178 && replayValid == otherEvent.replayValid;179 } else {180 return super.equals(otherEvent)181 && otherEvent.replayEvents == null182 && replayValid == otherEvent.replayValid;183 }184 185 } else {186 return false;187 }188 }189 162 190 163 @Override … … 192 165 return (other instanceof ReplayableEvent<?>); 193 166 } 194 195 /*196 * (non-Javadoc)197 *198 * @see de.ugoe.cs.eventbench.data.Event#hashCode()199 */200 @Override201 public int hashCode() {202 int multiplier = 17;203 int hash = super.hashCode();204 if (replayEvents != null) {205 hash = multiplier * hash + replayEvents.hashCode();206 }207 hash = multiplier * hash + (replayValid ? 1 : 0);208 209 return hash;210 }211 167 }
Note: See TracChangeset
for help on using the changeset viewer.