- Timestamp:
- 2021-09-12T03:22:18+02:00 (3 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/actions/CreateCircleAction.java
r17188 r18217 12 12 import java.util.LinkedList; 13 13 import java.util.List; 14 import java.util.Objects; 14 15 15 16 import javax.swing.JOptionPane; … … 113 114 public int compareTo(PolarNode o) { 114 115 return Double.compare(a, o.a); 116 } 117 118 @Override 119 public int hashCode() { 120 return Objects.hash(a, node); 121 } 122 123 @Override 124 public boolean equals(Object obj) { 125 if (this == obj) 126 return true; 127 if (obj == null || getClass() != obj.getClass()) 128 return false; 129 PolarNode other = (PolarNode) obj; 130 return Double.doubleToLongBits(a) == Double.doubleToLongBits(other.a) && Objects.equals(node, other.node); 115 131 } 116 132 } -
trunk/src/org/openstreetmap/josm/gui/autofilter/AutoFilterManager.java
r17042 r18217 161 161 return new Match(rule, value); 162 162 } 163 164 @Override 165 public int hashCode() { 166 return 31 * super.hashCode() + Objects.hash(rule, value); 167 } 168 169 @Override 170 public boolean equals(Object obj) { 171 if (this == obj) 172 return true; 173 if (!super.equals(obj) || getClass() != obj.getClass()) 174 return false; 175 CompiledFilter other = (CompiledFilter) obj; 176 return Objects.equals(rule, other.rule) && value == other.value; 177 } 163 178 } 164 179 -
trunk/src/org/openstreetmap/josm/gui/layer/geoimage/ImageDisplay.java
r18216 r18217 242 242 } 243 243 } 244 245 @Override 246 public int hashCode() { 247 return 31 * super.hashCode() + Objects.hash(init); 248 } 249 250 @Override 251 public boolean equals(Object obj) { 252 if (this == obj) 253 return true; 254 if (!super.equals(obj) || getClass() != obj.getClass()) 255 return false; 256 VisRect other = (VisRect) obj; 257 return Objects.equals(init, other.init); 258 } 244 259 } 245 260 -
trunk/src/org/openstreetmap/josm/gui/layer/geoimage/WikimediaCommonsEntry.java
r17880 r18217 2 2 package org.openstreetmap.josm.gui.layer.geoimage; 3 3 4 import java.net.MalformedURLException; 5 import java.net.URL; 6 import java.util.Objects; 7 4 8 import org.openstreetmap.josm.data.coor.LatLon; 5 9 import org.openstreetmap.josm.tools.Mediawiki; 6 7 import java.net.MalformedURLException;8 import java.net.URL;9 10 10 11 /** … … 33 34 return "File:" + title; 34 35 } 36 37 @Override 38 public int hashCode() { 39 return 31 * super.hashCode() + Objects.hash(title); 40 } 41 42 @Override 43 public boolean equals(Object obj) { 44 if (this == obj) 45 return true; 46 if (!super.equals(obj) || getClass() != obj.getClass()) 47 return false; 48 WikimediaCommonsEntry other = (WikimediaCommonsEntry) obj; 49 return Objects.equals(title, other.title); 50 } 35 51 }
Note:
See TracChangeset
for help on using the changeset viewer.