Changeset 7140 in josm
- Timestamp:
- 2014-05-18T15:47:10+02:00 (11 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/Preferences.java
r7085 r7140 175 175 this.value = value; 176 176 } 177 @Override public T getValue() { 177 @Override 178 public T getValue() { 178 179 return value; 179 180 } 180 @Override public String toString() { 181 @Override 182 public String toString() { 181 183 return value != null ? value.toString() : "null"; 184 } 185 @Override 186 public int hashCode() { 187 final int prime = 31; 188 int result = 1; 189 result = prime * result + ((value == null) ? 0 : value.hashCode()); 190 return result; 191 } 192 @Override 193 public boolean equals(Object obj) { 194 if (this == obj) 195 return true; 196 if (obj == null) 197 return false; 198 if (!(obj instanceof AbstractSetting)) 199 return false; 200 AbstractSetting<?> other = (AbstractSetting<?>) obj; 201 if (value == null) { 202 if (other.value != null) 203 return false; 204 } else if (!value.equals(other.value)) 205 return false; 206 return true; 182 207 } 183 208 } -
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 } -
trunk/src/org/openstreetmap/josm/gui/layer/WMSLayer.java
r7132 r7140 771 771 return new JMenuItem(this); 772 772 } 773 774 @Override775 public boolean equals(Object obj) {776 return obj instanceof ChangeResolutionAction;777 }778 773 } 779 774 -
trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/MapCSSRule.java
r7138 r7140 9 9 /** 10 10 * A MapCSS rule. 11 * 11 * 12 12 * A MapCSS style is simply a list of MapCSS rules. Each rule has a selector 13 13 * and a declaration. Whenever the selector matches the primitive, the … … 28 28 this.idx = idx; 29 29 } 30 30 31 31 /** 32 32 * <p>Executes the instructions against the environment {@code env}</p> … … 39 39 } 40 40 } 41 42 @Override 43 public int hashCode() { 44 final int prime = 31; 45 int result = 1; 46 result = prime * result + idx; 47 result = prime * result + ((instructions == null) ? 0 : instructions.hashCode()); 48 return result; 49 } 50 51 @Override 52 public boolean equals(Object obj) { 53 if (this == obj) 54 return true; 55 if (obj == null) 56 return false; 57 if (!(obj instanceof Declaration)) 58 return false; 59 Declaration other = (Declaration) obj; 60 if (idx != other.idx) 61 return false; 62 if (instructions == null) { 63 if (other.instructions != null) 64 return false; 65 } else if (!instructions.equals(other.instructions)) 66 return false; 67 return true; 68 } 41 69 } 42 70 43 71 public MapCSSRule(Selector selector, Declaration declaration) { 44 72 this.selector = selector;
Note:
See TracChangeset
for help on using the changeset viewer.