Changeset 7140 in josm for trunk/src/org/openstreetmap/josm/data/validation
- Timestamp:
- 2014-05-18T15:47:10+02:00 (10 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/data/validation
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/validation/Test.java
r7005 r7140 65 65 /** the progress monitor to use */ 66 66 protected ProgressMonitor progressMonitor; 67 67 68 68 /** the start time to compute elapsed time when test finishes */ 69 69 protected long startTime; 70 70 71 71 /** 72 72 * Constructor … … 329 329 return v != null && !"no".equals(v) && !"entrance".equals(v); 330 330 } 331 332 @Override 333 public int hashCode() { 334 final int prime = 31; 335 int result = 1; 336 result = prime * result + ((description == null) ? 0 : description.hashCode()); 337 result = prime * result + ((name == null) ? 0 : name.hashCode()); 338 return result; 339 } 340 341 @Override 342 public boolean equals(Object obj) { 343 if (this == obj) 344 return true; 345 if (obj == null) 346 return false; 347 if (!(obj instanceof Test)) 348 return false; 349 Test other = (Test) obj; 350 if (description == null) { 351 if (other.description != null) 352 return false; 353 } else if (!description.equals(other.description)) 354 return false; 355 if (name == null) { 356 if (other.name != null) 357 return false; 358 } else if (!name.equals(other.name)) 359 return false; 360 return true; 361 } 331 362 } -
trunk/src/org/openstreetmap/josm/data/validation/tests/MapCSSTagChecker.java
r7073 r7140 65 65 this.declaration = declaration; 66 66 } 67 } 67 68 @Override 69 public int hashCode() { 70 final int prime = 31; 71 int result = 1; 72 result = prime * result + ((declaration == null) ? 0 : declaration.hashCode()); 73 result = prime * result + ((selectors == null) ? 0 : selectors.hashCode()); 74 return result; 75 } 76 77 @Override 78 public boolean equals(Object obj) { 79 if (this == obj) 80 return true; 81 if (obj == null) 82 return false; 83 if (!(obj instanceof GroupedMapCSSRule)) 84 return false; 85 GroupedMapCSSRule other = (GroupedMapCSSRule) obj; 86 if (declaration == null) { 87 if (other.declaration != null) 88 return false; 89 } else if (!declaration.equals(other.declaration)) 90 return false; 91 if (selectors == null) { 92 if (other.selectors != null) 93 return false; 94 } else if (!selectors.equals(other.selectors)) 95 return false; 96 return true; 97 } 98 } 99 68 100 /** 69 101 * The preference key for tag checker source entries. … … 419 451 || (obj instanceof GroupedMapCSSRule && rule.equals(obj)); 420 452 } 453 454 @Override 455 public int hashCode() { 456 final int prime = 31; 457 int result = super.hashCode(); 458 result = prime * result + ((rule == null) ? 0 : rule.hashCode()); 459 return result; 460 } 421 461 } 422 462 … … 485 525 } 486 526 } 527 528 @Override 529 public int hashCode() { 530 final int prime = 31; 531 int result = super.hashCode(); 532 result = prime * result + ((checks == null) ? 0 : checks.hashCode()); 533 return result; 534 } 535 536 @Override 537 public boolean equals(Object obj) { 538 if (this == obj) 539 return true; 540 if (!super.equals(obj)) 541 return false; 542 if (!(obj instanceof MapCSSTagChecker)) 543 return false; 544 MapCSSTagChecker other = (MapCSSTagChecker) obj; 545 if (checks == null) { 546 if (other.checks != null) 547 return false; 548 } else if (!checks.equals(other.checks)) 549 return false; 550 return true; 551 } 487 552 }
Note:
See TracChangeset
for help on using the changeset viewer.