Changeset 9371 in josm for trunk/src/org/openstreetmap/josm/command/ChangePropertyCommand.java
- Timestamp:
- 2016-01-09T23:20:37+01:00 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/command/ChangePropertyCommand.java
r8975 r9371 14 14 import java.util.List; 15 15 import java.util.Map; 16 import java.util.Objects; 16 17 17 18 import javax.swing.Icon; … … 249 250 @Override 250 251 public int hashCode() { 251 final int prime = 31; 252 int result = super.hashCode(); 253 result = prime * result + ((objects == null) ? 0 : objects.hashCode()); 254 result = prime * result + ((tags == null) ? 0 : tags.hashCode()); 255 return result; 252 return Objects.hash(super.hashCode(), objects, tags); 256 253 } 257 254 258 255 @Override 259 256 public boolean equals(Object obj) { 260 if (this == obj) 261 return true; 262 if (!super.equals(obj)) 263 return false; 264 if (getClass() != obj.getClass()) 265 return false; 266 ChangePropertyCommand other = (ChangePropertyCommand) obj; 267 if (objects == null) { 268 if (other.objects != null) 269 return false; 270 } else if (!objects.equals(other.objects)) 271 return false; 272 if (tags == null) { 273 if (other.tags != null) 274 return false; 275 } else if (!tags.equals(other.tags)) 276 return false; 277 return true; 257 if (this == obj) return true; 258 if (obj == null || getClass() != obj.getClass()) return false; 259 if (!super.equals(obj)) return false; 260 ChangePropertyCommand that = (ChangePropertyCommand) obj; 261 return Objects.equals(objects, that.objects) && 262 Objects.equals(tags, that.tags); 278 263 } 279 264 }
Note:
See TracChangeset
for help on using the changeset viewer.