Changeset 9371 in josm for trunk/src/org/openstreetmap/josm/gui/mappaint/DividedScale.java
- Timestamp:
- 2016-01-09T23:20:37+01:00 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/mappaint/DividedScale.java
r9341 r9371 4 4 import java.util.ArrayList; 5 5 import java.util.List; 6 import java.util.Objects; 6 7 7 8 import org.openstreetmap.josm.gui.mappaint.styleelement.StyleElement; … … 176 177 @Override 177 178 public boolean equals(Object obj) { 178 if (obj == null || getClass() != obj.getClass()) 179 return false; 180 final DividedScale other = (DividedScale) obj; 181 return bd.equals(other.bd) && data.equals(other.data); 179 if (this == obj) return true; 180 if (obj == null || getClass() != obj.getClass()) return false; 181 DividedScale<?> that = (DividedScale<?>) obj; 182 return Objects.equals(bd, that.bd) && 183 Objects.equals(data, that.data); 182 184 } 183 185 184 186 @Override 185 187 public int hashCode() { 186 int hash = 7; 187 hash = 23 * hash + bd.hashCode(); 188 hash = 23 * hash + data.hashCode(); 189 return hash; 188 return Objects.hash(bd, data); 190 189 } 191 190
Note:
See TracChangeset
for help on using the changeset viewer.