Changeset 7140 in josm for trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/MapCSSRule.java
- Timestamp:
- 2014-05-18T15:47:10+02:00 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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.