Changeset 9371 in josm for trunk/src/org/openstreetmap/josm/data/conflict/ConflictCollection.java
- Timestamp:
- 2016-01-09T23:20:37+01:00 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/conflict/ConflictCollection.java
r9067 r9371 9 9 import java.util.Iterator; 10 10 import java.util.List; 11 import java.util.Objects; 11 12 import java.util.Set; 12 13 import java.util.concurrent.CopyOnWriteArrayList; … … 386 387 @Override 387 388 public int hashCode() { 388 final int prime = 31; 389 int result = 1; 390 result = prime * result + ((conflicts == null) ? 0 : conflicts.hashCode()); 391 result = prime * result + ((listeners == null) ? 0 : listeners.hashCode()); 392 return result; 389 return Objects.hash(conflicts, listeners); 393 390 } 394 391 395 392 @Override 396 393 public boolean equals(Object obj) { 397 if (this == obj) 398 return true; 399 if (obj == null) 400 return false; 401 if (getClass() != obj.getClass()) 402 return false; 403 ConflictCollection other = (ConflictCollection) obj; 404 if (conflicts == null) { 405 if (other.conflicts != null) 406 return false; 407 } else if (!conflicts.equals(other.conflicts)) 408 return false; 409 if (listeners == null) { 410 if (other.listeners != null) 411 return false; 412 } else if (!listeners.equals(other.listeners)) 413 return false; 414 return true; 394 if (this == obj) return true; 395 if (obj == null || getClass() != obj.getClass()) return false; 396 ConflictCollection conflicts1 = (ConflictCollection) obj; 397 return Objects.equals(conflicts, conflicts1.conflicts) && 398 Objects.equals(listeners, conflicts1.listeners); 415 399 } 416 400 }
Note:
See TracChangeset
for help on using the changeset viewer.