Changeset 6 in josm for src/org/openstreetmap/josm/data/osm/OsmPrimitive.java
- Timestamp:
- 2005-10-01T04:01:45+02:00 (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/org/openstreetmap/josm/data/osm/OsmPrimitive.java
r2 r6 20 20 * If set to true, this object has been modified in the current session. 21 21 */ 22 public boolean modified = false;22 transient public boolean modified = false; 23 23 24 24 /** 25 25 * If set to true, this object is currently selected. 26 26 */ 27 public boolean selected = false; 27 transient public boolean selected = false; 28 29 /** 30 * Osm primitives are equal, when their keys are equal. 31 */ 32 @Override 33 public boolean equals(Object obj) { 34 if (obj == null) 35 return false; 36 if (!(obj instanceof OsmPrimitive)) 37 return false; 38 OsmPrimitive osm = (OsmPrimitive)obj; 39 if (keys == null) 40 return osm.keys == null; 41 return keys.equals(osm.keys); 42 } 43 44 /** 45 * Compute the hashCode from the keys. 46 */ 47 @Override 48 public int hashCode() { 49 return keys == null ? 0 : keys.hashCode(); 50 } 51 52 28 53 }
Note:
See TracChangeset
for help on using the changeset viewer.