Changeset 9371 in josm for trunk/src/org/openstreetmap/josm/command/conflict/WayNodesConflictResolverCommand.java
- Timestamp:
- 2016-01-09T23:20:37+01:00 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/command/conflict/WayNodesConflictResolverCommand.java
r8910 r9371 6 6 import java.util.Collection; 7 7 import java.util.List; 8 import java.util.Objects; 8 9 9 10 import javax.swing.Icon; … … 75 76 @Override 76 77 public int hashCode() { 77 final int prime = 31; 78 int result = super.hashCode(); 79 result = prime * result + ((conflict == null) ? 0 : conflict.hashCode()); 80 result = prime * result + ((mergedNodeList == null) ? 0 : mergedNodeList.hashCode()); 81 return result; 78 return Objects.hash(super.hashCode(), conflict, mergedNodeList); 82 79 } 83 80 84 81 @Override 85 82 public boolean equals(Object obj) { 86 if (this == obj) 87 return true; 88 if (!super.equals(obj)) 89 return false; 90 if (getClass() != obj.getClass()) 91 return false; 92 WayNodesConflictResolverCommand other = (WayNodesConflictResolverCommand) obj; 93 if (conflict == null) { 94 if (other.conflict != null) 95 return false; 96 } else if (!conflict.equals(other.conflict)) 97 return false; 98 if (mergedNodeList == null) { 99 if (other.mergedNodeList != null) 100 return false; 101 } else if (!mergedNodeList.equals(other.mergedNodeList)) 102 return false; 103 return true; 83 if (this == obj) return true; 84 if (obj == null || getClass() != obj.getClass()) return false; 85 if (!super.equals(obj)) return false; 86 WayNodesConflictResolverCommand that = (WayNodesConflictResolverCommand) obj; 87 return Objects.equals(conflict, that.conflict) && 88 Objects.equals(mergedNodeList, that.mergedNodeList); 104 89 } 105 90 }
Note:
See TracChangeset
for help on using the changeset viewer.