Changeset 343 in josm for trunk/src/org/openstreetmap/josm/data/osm/OsmPrimitive.java
- Timestamp:
- 2007-10-07T13:20:27+02:00 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/osm/OsmPrimitive.java
r298 r343 3 3 4 4 import java.text.SimpleDateFormat; 5 import java.util.ArrayList; 5 6 import java.util.Collection; 6 7 import java.util.Collections; … … 90 91 91 92 /** 93 * If set to true, this object is incomplete, which means only the id 94 * and type is known (type is the objects instance class) 95 */ 96 public boolean incomplete = false; 97 98 /** 92 99 * Implementation of the visitor scheme. Subclases have to call the correct 93 100 * visitor function. … … 125 132 Visitor v = new Visitor(){ 126 133 public void visit(Node n) { ret[0] = 1; } 127 public void visit( Segment s) { ret[0] = 2; }128 public void visit( Way w) { ret[0] = 3; }134 public void visit(Way w) { ret[0] = 2; } 135 public void visit(Relation e) { ret[0] = 3; } 129 136 }; 130 137 visit(v); 131 return id == 0 ? super.hashCode() : (int)(id<< 3)+ret[0];138 return id == 0 ? super.hashCode() : (int)(id<<2)+ret[0]; 132 139 } 133 140 … … 205 212 return timestamp == null ? null : new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(timestamp); 206 213 } 214 215 207 216 }
Note:
See TracChangeset
for help on using the changeset viewer.