- Timestamp:
- 2009-11-19T15:18:10+01:00 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/osm/OsmPrimitive.java
r2474 r2481 41 41 } 42 42 43 private static class KeysEntry implements Entry<String, String> 43 private static class KeysEntry implements Entry<String, String>{ 44 44 45 45 private final String key; … … 63 63 } 64 64 65 @Override 66 public int hashCode() { 67 final int prime = 31; 68 int result = 1; 69 result = prime * result + ((key == null) ? 0 : key.hashCode()); 70 result = prime * result + ((value == null) ? 0 : value.hashCode()); 71 return result; 72 } 73 74 @Override 75 public boolean equals(Object obj) { 76 if (this == obj) 77 return true; 78 if (obj == null) 79 return false; 80 if (getClass() != obj.getClass()) 81 return false; 82 KeysEntry other = (KeysEntry) obj; 83 if (key == null) { 84 if (other.key != null) 85 return false; 86 } else if (!key.equals(other.key)) 87 return false; 88 if (value == null) { 89 if (other.value != null) 90 return false; 91 } else if (!value.equals(other.value)) 92 return false; 93 return true; 94 } 65 95 } 66 96 … … 142 172 private long id = 0; 143 173 174 /** the parent dataset */ 144 175 private DataSet dataSet; 145 176 … … 908 939 if (incomplete && ! other.incomplete || !incomplete && other.incomplete) 909 940 return false; 910 return (keys == null ? other.keys==null : keys.equals(other.keys));941 return keySet().equals(other.keySet()); 911 942 } 912 943
Note:
See TracChangeset
for help on using the changeset viewer.