Changeset 8456 in josm for trunk/src/org/openstreetmap/josm/command
- Timestamp:
- 2015-06-03T04:36:57+02:00 (10 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/command
- Files:
-
- 24 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/command/AddCommand.java
r7587 r8456 96 96 return Collections.singleton(osm); 97 97 } 98 99 @Override 100 public int hashCode() { 101 final int prime = 31; 102 int result = super.hashCode(); 103 result = prime * result + ((osm == null) ? 0 : osm.hashCode()); 104 return result; 105 } 106 107 @Override 108 public boolean equals(Object obj) { 109 if (this == obj) 110 return true; 111 if (!super.equals(obj)) 112 return false; 113 if (getClass() != obj.getClass()) 114 return false; 115 AddCommand other = (AddCommand) obj; 116 if (osm == null) { 117 if (other.osm != null) 118 return false; 119 } else if (!osm.equals(other.osm)) 120 return false; 121 return true; 122 } 98 123 } -
trunk/src/org/openstreetmap/josm/command/AddPrimitivesCommand.java
r7005 r8456 8 8 import java.util.HashSet; 9 9 import java.util.List; 10 10 11 import javax.swing.Icon; 11 12 … … 171 172 return prims; 172 173 } 174 175 @Override 176 public int hashCode() { 177 final int prime = 31; 178 int result = super.hashCode(); 179 result = prime * result + ((createdPrimitives == null) ? 0 : createdPrimitives.hashCode()); 180 result = prime * result + ((createdPrimitivesToSelect == null) ? 0 : createdPrimitivesToSelect.hashCode()); 181 result = prime * result + ((data == null) ? 0 : data.hashCode()); 182 result = prime * result + ((toSelect == null) ? 0 : toSelect.hashCode()); 183 return result; 184 } 185 186 @Override 187 public boolean equals(Object obj) { 188 if (this == obj) 189 return true; 190 if (!super.equals(obj)) 191 return false; 192 if (getClass() != obj.getClass()) 193 return false; 194 AddPrimitivesCommand other = (AddPrimitivesCommand) obj; 195 if (createdPrimitives == null) { 196 if (other.createdPrimitives != null) 197 return false; 198 } else if (!createdPrimitives.equals(other.createdPrimitives)) 199 return false; 200 if (createdPrimitivesToSelect == null) { 201 if (other.createdPrimitivesToSelect != null) 202 return false; 203 } else if (!createdPrimitivesToSelect.equals(other.createdPrimitivesToSelect)) 204 return false; 205 if (data == null) { 206 if (other.data != null) 207 return false; 208 } else if (!data.equals(other.data)) 209 return false; 210 if (toSelect == null) { 211 if (other.toSelect != null) 212 return false; 213 } else if (!toSelect.equals(other.toSelect)) 214 return false; 215 return true; 216 } 173 217 } -
trunk/src/org/openstreetmap/josm/command/ChangeCommand.java
r6881 r8456 88 88 return ImageProvider.get(osm.getDisplayType()); 89 89 } 90 91 @Override 92 public int hashCode() { 93 final int prime = 31; 94 int result = super.hashCode(); 95 result = prime * result + ((newOsm == null) ? 0 : newOsm.hashCode()); 96 result = prime * result + ((osm == null) ? 0 : osm.hashCode()); 97 return result; 98 } 99 100 @Override 101 public boolean equals(Object obj) { 102 if (this == obj) 103 return true; 104 if (!super.equals(obj)) 105 return false; 106 if (getClass() != obj.getClass()) 107 return false; 108 ChangeCommand other = (ChangeCommand) obj; 109 if (newOsm == null) { 110 if (other.newOsm != null) 111 return false; 112 } else if (!newOsm.equals(other.newOsm)) 113 return false; 114 if (osm == null) { 115 if (other.osm != null) 116 return false; 117 } else if (!osm.equals(other.osm)) 118 return false; 119 return true; 120 } 90 121 } -
trunk/src/org/openstreetmap/josm/command/ChangeNodesCommand.java
r8378 r8456 61 61 return ImageProvider.get(OsmPrimitiveType.WAY); 62 62 } 63 64 @Override 65 public int hashCode() { 66 final int prime = 31; 67 int result = super.hashCode(); 68 result = prime * result + ((newNodes == null) ? 0 : newNodes.hashCode()); 69 result = prime * result + ((way == null) ? 0 : way.hashCode()); 70 return result; 71 } 72 73 @Override 74 public boolean equals(Object obj) { 75 if (this == obj) 76 return true; 77 if (!super.equals(obj)) 78 return false; 79 if (getClass() != obj.getClass()) 80 return false; 81 ChangeNodesCommand other = (ChangeNodesCommand) obj; 82 if (newNodes == null) { 83 if (other.newNodes != null) 84 return false; 85 } else if (!newNodes.equals(other.newNodes)) 86 return false; 87 if (way == null) { 88 if (other.way != null) 89 return false; 90 } else if (!way.equals(other.way)) 91 return false; 92 return true; 93 } 63 94 } -
trunk/src/org/openstreetmap/josm/command/ChangePropertyCommand.java
r8342 r8456 223 223 return Collections.unmodifiableMap(tags); 224 224 } 225 226 @Override 227 public int hashCode() { 228 final int prime = 31; 229 int result = super.hashCode(); 230 result = prime * result + ((objects == null) ? 0 : objects.hashCode()); 231 result = prime * result + ((tags == null) ? 0 : tags.hashCode()); 232 return result; 233 } 234 235 @Override 236 public boolean equals(Object obj) { 237 if (this == obj) 238 return true; 239 if (!super.equals(obj)) 240 return false; 241 if (getClass() != obj.getClass()) 242 return false; 243 ChangePropertyCommand other = (ChangePropertyCommand) obj; 244 if (objects == null) { 245 if (other.objects != null) 246 return false; 247 } else if (!objects.equals(other.objects)) 248 return false; 249 if (tags == null) { 250 if (other.tags != null) 251 return false; 252 } else if (!tags.equals(other.tags)) 253 return false; 254 return true; 255 } 225 256 } -
trunk/src/org/openstreetmap/josm/command/ChangePropertyKeyCommand.java
r8443 r8456 124 124 return children; 125 125 } 126 127 @Override 128 public int hashCode() { 129 final int prime = 31; 130 int result = super.hashCode(); 131 result = prime * result + ((key == null) ? 0 : key.hashCode()); 132 result = prime * result + ((newKey == null) ? 0 : newKey.hashCode()); 133 result = prime * result + ((objects == null) ? 0 : objects.hashCode()); 134 return result; 135 } 136 137 @Override 138 public boolean equals(Object obj) { 139 if (this == obj) 140 return true; 141 if (!super.equals(obj)) 142 return false; 143 if (getClass() != obj.getClass()) 144 return false; 145 ChangePropertyKeyCommand other = (ChangePropertyKeyCommand) obj; 146 if (key == null) { 147 if (other.key != null) 148 return false; 149 } else if (!key.equals(other.key)) 150 return false; 151 if (newKey == null) { 152 if (other.newKey != null) 153 return false; 154 } else if (!newKey.equals(other.newKey)) 155 return false; 156 if (objects == null) { 157 if (other.objects != null) 158 return false; 159 } else if (!objects.equals(other.objects)) 160 return false; 161 return true; 162 } 126 163 } -
trunk/src/org/openstreetmap/josm/command/ChangeRelationMemberRoleCommand.java
r6881 r8456 81 81 return ImageProvider.get(relation.getDisplayType()); 82 82 } 83 84 @Override 85 public int hashCode() { 86 final int prime = 31; 87 int result = super.hashCode(); 88 result = prime * result + ((newRole == null) ? 0 : newRole.hashCode()); 89 result = prime * result + ((oldModified == null) ? 0 : oldModified.hashCode()); 90 result = prime * result + ((oldRole == null) ? 0 : oldRole.hashCode()); 91 result = prime * result + position; 92 result = prime * result + ((relation == null) ? 0 : relation.hashCode()); 93 return result; 94 } 95 96 @Override 97 public boolean equals(Object obj) { 98 if (this == obj) 99 return true; 100 if (!super.equals(obj)) 101 return false; 102 if (getClass() != obj.getClass()) 103 return false; 104 ChangeRelationMemberRoleCommand other = (ChangeRelationMemberRoleCommand) obj; 105 if (newRole == null) { 106 if (other.newRole != null) 107 return false; 108 } else if (!newRole.equals(other.newRole)) 109 return false; 110 if (oldModified == null) { 111 if (other.oldModified != null) 112 return false; 113 } else if (!oldModified.equals(other.oldModified)) 114 return false; 115 if (oldRole == null) { 116 if (other.oldRole != null) 117 return false; 118 } else if (!oldRole.equals(other.oldRole)) 119 return false; 120 if (position != other.position) 121 return false; 122 if (relation == null) { 123 if (other.relation != null) 124 return false; 125 } else if (!relation.equals(other.relation)) 126 return false; 127 return true; 128 } 83 129 } -
trunk/src/org/openstreetmap/josm/command/DeleteCommand.java
r8388 r8456 516 516 JOptionPane.YES_OPTION); 517 517 } 518 519 @Override 520 public int hashCode() { 521 final int prime = 31; 522 int result = super.hashCode(); 523 result = prime * result + ((clonedPrimitives == null) ? 0 : clonedPrimitives.hashCode()); 524 result = prime * result + ((toDelete == null) ? 0 : toDelete.hashCode()); 525 return result; 526 } 527 528 @Override 529 public boolean equals(Object obj) { 530 if (this == obj) 531 return true; 532 if (!super.equals(obj)) 533 return false; 534 if (getClass() != obj.getClass()) 535 return false; 536 DeleteCommand other = (DeleteCommand) obj; 537 if (clonedPrimitives == null) { 538 if (other.clonedPrimitives != null) 539 return false; 540 } else if (!clonedPrimitives.equals(other.clonedPrimitives)) 541 return false; 542 if (toDelete == null) { 543 if (other.toDelete != null) 544 return false; 545 } else if (!toDelete.equals(other.toDelete)) 546 return false; 547 return true; 548 } 518 549 } -
trunk/src/org/openstreetmap/josm/command/PurgeCommand.java
r8346 r8456 270 270 public void fillModifiedData(Collection<OsmPrimitive> modified, Collection<OsmPrimitive> deleted, Collection<OsmPrimitive> added) { 271 271 } 272 273 @Override 274 public int hashCode() { 275 final int prime = 31; 276 int result = super.hashCode(); 277 result = prime * result + ((ds == null) ? 0 : ds.hashCode()); 278 result = prime * result + ((makeIncompleteData == null) ? 0 : makeIncompleteData.hashCode()); 279 result = prime * result + ((makeIncompleteDataByPrimId == null) ? 0 : makeIncompleteDataByPrimId.hashCode()); 280 result = prime * result + ((purgedConflicts == null) ? 0 : purgedConflicts.hashCode()); 281 result = prime * result + ((toPurge == null) ? 0 : toPurge.hashCode()); 282 return result; 283 } 284 285 @Override 286 public boolean equals(Object obj) { 287 if (this == obj) 288 return true; 289 if (!super.equals(obj)) 290 return false; 291 if (getClass() != obj.getClass()) 292 return false; 293 PurgeCommand other = (PurgeCommand) obj; 294 if (ds == null) { 295 if (other.ds != null) 296 return false; 297 } else if (!ds.equals(other.ds)) 298 return false; 299 if (makeIncompleteData == null) { 300 if (other.makeIncompleteData != null) 301 return false; 302 } else if (!makeIncompleteData.equals(other.makeIncompleteData)) 303 return false; 304 if (makeIncompleteDataByPrimId == null) { 305 if (other.makeIncompleteDataByPrimId != null) 306 return false; 307 } else if (!makeIncompleteDataByPrimId.equals(other.makeIncompleteDataByPrimId)) 308 return false; 309 if (purgedConflicts == null) { 310 if (other.purgedConflicts != null) 311 return false; 312 } else if (!purgedConflicts.equals(other.purgedConflicts)) 313 return false; 314 if (toPurge == null) { 315 if (other.toPurge != null) 316 return false; 317 } else if (!toPurge.equals(other.toPurge)) 318 return false; 319 return true; 320 } 272 321 } -
trunk/src/org/openstreetmap/josm/command/RemoveNodesCommand.java
r8378 r8456 62 62 return ImageProvider.get(OsmPrimitiveType.WAY); 63 63 } 64 65 @Override 66 public int hashCode() { 67 final int prime = 31; 68 int result = super.hashCode(); 69 result = prime * result + ((rmNodes == null) ? 0 : rmNodes.hashCode()); 70 result = prime * result + ((way == null) ? 0 : way.hashCode()); 71 return result; 72 } 73 74 @Override 75 public boolean equals(Object obj) { 76 if (this == obj) 77 return true; 78 if (!super.equals(obj)) 79 return false; 80 if (getClass() != obj.getClass()) 81 return false; 82 RemoveNodesCommand other = (RemoveNodesCommand) obj; 83 if (rmNodes == null) { 84 if (other.rmNodes != null) 85 return false; 86 } else if (!rmNodes.equals(other.rmNodes)) 87 return false; 88 if (way == null) { 89 if (other.way != null) 90 return false; 91 } else if (!way.equals(other.way)) 92 return false; 93 return true; 94 } 64 95 } -
trunk/src/org/openstreetmap/josm/command/RotateCommand.java
r8443 r8456 86 86 return trn("Rotate {0} node", "Rotate {0} nodes", nodes.size(), nodes.size()); 87 87 } 88 89 @Override 90 public int hashCode() { 91 final int prime = 31; 92 int result = super.hashCode(); 93 result = prime * result + ((pivot == null) ? 0 : pivot.hashCode()); 94 long temp; 95 temp = Double.doubleToLongBits(rotationAngle); 96 result = prime * result + (int) (temp ^ (temp >>> 32)); 97 temp = Double.doubleToLongBits(startAngle); 98 result = prime * result + (int) (temp ^ (temp >>> 32)); 99 return result; 100 } 101 102 @Override 103 public boolean equals(Object obj) { 104 if (this == obj) 105 return true; 106 if (!super.equals(obj)) 107 return false; 108 if (getClass() != obj.getClass()) 109 return false; 110 RotateCommand other = (RotateCommand) obj; 111 if (pivot == null) { 112 if (other.pivot != null) 113 return false; 114 } else if (!pivot.equals(other.pivot)) 115 return false; 116 if (Double.doubleToLongBits(rotationAngle) != Double.doubleToLongBits(other.rotationAngle)) 117 return false; 118 if (Double.doubleToLongBits(startAngle) != Double.doubleToLongBits(other.startAngle)) 119 return false; 120 return true; 121 } 88 122 } -
trunk/src/org/openstreetmap/josm/command/ScaleCommand.java
r8392 r8456 78 78 return trn("Scale {0} node", "Scale {0} nodes", nodes.size(), nodes.size()); 79 79 } 80 81 @Override 82 public int hashCode() { 83 final int prime = 31; 84 int result = super.hashCode(); 85 result = prime * result + ((pivot == null) ? 0 : pivot.hashCode()); 86 long temp; 87 temp = Double.doubleToLongBits(scalingFactor); 88 result = prime * result + (int) (temp ^ (temp >>> 32)); 89 result = prime * result + ((startEN == null) ? 0 : startEN.hashCode()); 90 return result; 91 } 92 93 @Override 94 public boolean equals(Object obj) { 95 if (this == obj) 96 return true; 97 if (!super.equals(obj)) 98 return false; 99 if (getClass() != obj.getClass()) 100 return false; 101 ScaleCommand other = (ScaleCommand) obj; 102 if (pivot == null) { 103 if (other.pivot != null) 104 return false; 105 } else if (!pivot.equals(other.pivot)) 106 return false; 107 if (Double.doubleToLongBits(scalingFactor) != Double.doubleToLongBits(other.scalingFactor)) 108 return false; 109 if (startEN == null) { 110 if (other.startEN != null) 111 return false; 112 } else if (!startEN.equals(other.startEN)) 113 return false; 114 return true; 115 } 80 116 } -
trunk/src/org/openstreetmap/josm/command/SelectCommand.java
r7937 r8456 51 51 return trn("Selected {0} object", "Selected {0} objects", size, size); 52 52 } 53 54 @Override 55 public int hashCode() { 56 final int prime = 31; 57 int result = super.hashCode(); 58 result = prime * result + ((newSelection == null) ? 0 : newSelection.hashCode()); 59 result = prime * result + ((oldSelection == null) ? 0 : oldSelection.hashCode()); 60 return result; 61 } 62 63 @Override 64 public boolean equals(Object obj) { 65 if (this == obj) 66 return true; 67 if (!super.equals(obj)) 68 return false; 69 if (getClass() != obj.getClass()) 70 return false; 71 SelectCommand other = (SelectCommand) obj; 72 if (newSelection == null) { 73 if (other.newSelection != null) 74 return false; 75 } else if (!newSelection.equals(other.newSelection)) 76 return false; 77 if (oldSelection == null) { 78 if (other.oldSelection != null) 79 return false; 80 } else if (!oldSelection.equals(other.oldSelection)) 81 return false; 82 return true; 83 } 53 84 } -
trunk/src/org/openstreetmap/josm/command/SequenceCommand.java
r7436 r8456 123 123 this.sequenceComplete = sequenceComplete; 124 124 } 125 126 @Override 127 public int hashCode() { 128 final int prime = 31; 129 int result = super.hashCode(); 130 result = prime * result + (continueOnError ? 1231 : 1237); 131 result = prime * result + ((name == null) ? 0 : name.hashCode()); 132 result = prime * result + Arrays.hashCode(sequence); 133 result = prime * result + (sequenceComplete ? 1231 : 1237); 134 return result; 135 } 136 137 @Override 138 public boolean equals(Object obj) { 139 if (this == obj) 140 return true; 141 if (!super.equals(obj)) 142 return false; 143 if (getClass() != obj.getClass()) 144 return false; 145 SequenceCommand other = (SequenceCommand) obj; 146 if (continueOnError != other.continueOnError) 147 return false; 148 if (name == null) { 149 if (other.name != null) 150 return false; 151 } else if (!name.equals(other.name)) 152 return false; 153 if (!Arrays.equals(sequence, other.sequence)) 154 return false; 155 if (sequenceComplete != other.sequenceComplete) 156 return false; 157 return true; 158 } 125 159 } -
trunk/src/org/openstreetmap/josm/command/TransformNodesCommand.java
r8443 r8456 28 28 */ 29 29 protected Collection<Node> nodes = new LinkedList<>(); 30 31 30 32 31 /** … … 140 139 141 140 } 141 142 @Override 143 public int hashCode() { 144 final int prime = 31; 145 int result = super.hashCode(); 146 result = prime * result + ((nodes == null) ? 0 : nodes.hashCode()); 147 result = prime * result + ((oldStates == null) ? 0 : oldStates.hashCode()); 148 return result; 149 } 150 151 @Override 152 public boolean equals(Object obj) { 153 if (this == obj) 154 return true; 155 if (!super.equals(obj)) 156 return false; 157 if (getClass() != obj.getClass()) 158 return false; 159 TransformNodesCommand other = (TransformNodesCommand) obj; 160 if (nodes == null) { 161 if (other.nodes != null) 162 return false; 163 } else if (!nodes.equals(other.nodes)) 164 return false; 165 if (oldStates == null) { 166 if (other.oldStates != null) 167 return false; 168 } else if (!oldStates.equals(other.oldStates)) 169 return false; 170 return true; 171 } 142 172 } -
trunk/src/org/openstreetmap/josm/command/conflict/ConflictAddCommand.java
r8444 r8456 86 86 return ImageProvider.get(conflict.getMy().getDisplayType()); 87 87 } 88 89 @Override 90 public int hashCode() { 91 final int prime = 31; 92 int result = super.hashCode(); 93 result = prime * result + ((conflict == null) ? 0 : conflict.hashCode()); 94 return result; 95 } 96 97 @Override 98 public boolean equals(Object obj) { 99 if (this == obj) 100 return true; 101 if (!super.equals(obj)) 102 return false; 103 if (getClass() != obj.getClass()) 104 return false; 105 ConflictAddCommand other = (ConflictAddCommand) obj; 106 if (conflict == null) { 107 if (other.conflict != null) 108 return false; 109 } else if (!conflict.equals(other.conflict)) 110 return false; 111 return true; 112 } 88 113 } -
trunk/src/org/openstreetmap/josm/command/conflict/ConflictResolveCommand.java
r8444 r8456 79 79 reconstituteConflicts(); 80 80 } 81 82 @Override 83 public int hashCode() { 84 final int prime = 31; 85 int result = super.hashCode(); 86 result = prime * result + ((resolvedConflicts == null) ? 0 : resolvedConflicts.hashCode()); 87 return result; 88 } 89 90 @Override 91 public boolean equals(Object obj) { 92 if (this == obj) 93 return true; 94 if (!super.equals(obj)) 95 return false; 96 if (getClass() != obj.getClass()) 97 return false; 98 ConflictResolveCommand other = (ConflictResolveCommand) obj; 99 if (resolvedConflicts == null) { 100 if (other.resolvedConflicts != null) 101 return false; 102 } else if (!resolvedConflicts.equals(other.resolvedConflicts)) 103 return false; 104 return true; 105 } 81 106 } -
trunk/src/org/openstreetmap/josm/command/conflict/CoordinateConflictResolveCommand.java
r6887 r8456 76 76 modified.add(conflict.getMy()); 77 77 } 78 79 @Override 80 public int hashCode() { 81 final int prime = 31; 82 int result = super.hashCode(); 83 result = prime * result + ((conflict == null) ? 0 : conflict.hashCode()); 84 result = prime * result + ((decision == null) ? 0 : decision.hashCode()); 85 return result; 86 } 87 88 @Override 89 public boolean equals(Object obj) { 90 if (this == obj) 91 return true; 92 if (!super.equals(obj)) 93 return false; 94 if (getClass() != obj.getClass()) 95 return false; 96 CoordinateConflictResolveCommand other = (CoordinateConflictResolveCommand) obj; 97 if (conflict == null) { 98 if (other.conflict != null) 99 return false; 100 } else if (!conflict.equals(other.conflict)) 101 return false; 102 if (decision != other.decision) 103 return false; 104 return true; 105 } 78 106 } -
trunk/src/org/openstreetmap/josm/command/conflict/DeletedStateConflictResolveCommand.java
r7509 r8456 88 88 modified.addAll(conflict.getMy().getReferrers()); 89 89 } 90 91 @Override 92 public int hashCode() { 93 final int prime = 31; 94 int result = super.hashCode(); 95 result = prime * result + ((conflict == null) ? 0 : conflict.hashCode()); 96 result = prime * result + ((decision == null) ? 0 : decision.hashCode()); 97 return result; 98 } 99 100 @Override 101 public boolean equals(Object obj) { 102 if (this == obj) 103 return true; 104 if (!super.equals(obj)) 105 return false; 106 if (getClass() != obj.getClass()) 107 return false; 108 DeletedStateConflictResolveCommand other = (DeletedStateConflictResolveCommand) obj; 109 if (conflict == null) { 110 if (other.conflict != null) 111 return false; 112 } else if (!conflict.equals(other.conflict)) 113 return false; 114 if (decision != other.decision) 115 return false; 116 return true; 117 } 90 118 } -
trunk/src/org/openstreetmap/josm/command/conflict/ModifiedConflictResolveCommand.java
r6887 r8456 64 64 modified.add(conflict.getMy()); 65 65 } 66 67 @Override 68 public int hashCode() { 69 final int prime = 31; 70 int result = super.hashCode(); 71 result = prime * result + ((conflict == null) ? 0 : conflict.hashCode()); 72 return result; 73 } 74 75 @Override 76 public boolean equals(Object obj) { 77 if (this == obj) 78 return true; 79 if (!super.equals(obj)) 80 return false; 81 if (getClass() != obj.getClass()) 82 return false; 83 ModifiedConflictResolveCommand other = (ModifiedConflictResolveCommand) obj; 84 if (conflict == null) { 85 if (other.conflict != null) 86 return false; 87 } else if (!conflict.equals(other.conflict)) 88 return false; 89 return true; 90 } 66 91 } -
trunk/src/org/openstreetmap/josm/command/conflict/RelationMemberConflictResolverCommand.java
r8444 r8456 95 95 } 96 96 } 97 98 @Override 99 public int hashCode() { 100 final int prime = 31; 101 int result = super.hashCode(); 102 result = prime * result + ((mergedMembers == null) ? 0 : mergedMembers.hashCode()); 103 result = prime * result + ((my == null) ? 0 : my.hashCode()); 104 result = prime * result + ((their == null) ? 0 : their.hashCode()); 105 return result; 106 } 107 108 @Override 109 public boolean equals(Object obj) { 110 if (this == obj) 111 return true; 112 if (!super.equals(obj)) 113 return false; 114 if (getClass() != obj.getClass()) 115 return false; 116 RelationMemberConflictResolverCommand other = (RelationMemberConflictResolverCommand) obj; 117 if (mergedMembers == null) { 118 if (other.mergedMembers != null) 119 return false; 120 } else if (!mergedMembers.equals(other.mergedMembers)) 121 return false; 122 if (my == null) { 123 if (other.my != null) 124 return false; 125 } else if (!my.equals(other.my)) 126 return false; 127 if (their == null) { 128 if (other.their != null) 129 return false; 130 } else if (!their.equals(other.their)) 131 return false; 132 return true; 133 } 97 134 } -
trunk/src/org/openstreetmap/josm/command/conflict/TagConflictResolveCommand.java
r8444 r8456 97 97 modified.add(conflict.getMy()); 98 98 } 99 100 @Override 101 public int hashCode() { 102 final int prime = 31; 103 int result = super.hashCode(); 104 result = prime * result + ((conflict == null) ? 0 : conflict.hashCode()); 105 result = prime * result + ((mergeItems == null) ? 0 : mergeItems.hashCode()); 106 return result; 107 } 108 109 @Override 110 public boolean equals(Object obj) { 111 if (this == obj) 112 return true; 113 if (!super.equals(obj)) 114 return false; 115 if (getClass() != obj.getClass()) 116 return false; 117 TagConflictResolveCommand other = (TagConflictResolveCommand) obj; 118 if (conflict == null) { 119 if (other.conflict != null) 120 return false; 121 } else if (!conflict.equals(other.conflict)) 122 return false; 123 if (mergeItems == null) { 124 if (other.mergeItems != null) 125 return false; 126 } else if (!mergeItems.equals(other.mergeItems)) 127 return false; 128 return true; 129 } 99 130 } -
trunk/src/org/openstreetmap/josm/command/conflict/VersionConflictResolveCommand.java
r6887 r8456 73 73 modified.add(conflict.getMy()); 74 74 } 75 76 @Override 77 public int hashCode() { 78 final int prime = 31; 79 int result = super.hashCode(); 80 result = prime * result + ((conflict == null) ? 0 : conflict.hashCode()); 81 return result; 82 } 83 84 @Override 85 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 VersionConflictResolveCommand other = (VersionConflictResolveCommand) obj; 93 if (conflict == null) { 94 if (other.conflict != null) 95 return false; 96 } else if (!conflict.equals(other.conflict)) 97 return false; 98 return true; 99 } 75 100 } -
trunk/src/org/openstreetmap/josm/command/conflict/WayNodesConflictResolverCommand.java
r8444 r8456 72 72 modified.add(conflict.getMy()); 73 73 } 74 75 @Override 76 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; 82 } 83 84 @Override 85 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; 104 } 74 105 }
Note:
See TracChangeset
for help on using the changeset viewer.