Changeset 1690 in josm for trunk/src/org/openstreetmap/josm/data/osm/Node.java
- Timestamp:
- 23.06.2009 22:03:37 (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/osm/Node.java
r1640 r1690 31 31 32 32 public final void setEastNorth(EastNorth eastNorth) { 33 this.eastNorth = eastNorth;34 this.coor = Main.proj.eastNorth2latlon(eastNorth);33 this.eastNorth = eastNorth; 34 this.coor = Main.proj.eastNorth2latlon(eastNorth); 35 35 } 36 36 … … 87 87 } 88 88 89 /** 90 * @deprecated 91 * @see #hasEqualSemanticAttributes(OsmPrimitive) 92 * @see #hasEqualTechnicalAttributes(OsmPrimitive) 93 */ 94 @Deprecated 89 95 @Override public boolean realEqual(OsmPrimitive osm, boolean semanticOnly) { 90 96 if (osm instanceof Node) { … … 99 105 } 100 106 107 @Override 108 public boolean hasEqualSemanticAttributes(OsmPrimitive other) { 109 if (other == null || ! (other instanceof Node) ) 110 return false; 111 if (! super.hasEqualSemanticAttributes(other)) 112 return false; 113 Node n = (Node)other; 114 if (coor == null && n.coor == null) 115 return true; 116 else if (coor != null && n.coor != null) 117 return coor.equals(n.coor); 118 else 119 return false; 120 } 121 101 122 public int compareTo(OsmPrimitive o) { 102 123 return o instanceof Node ? Long.valueOf(id).compareTo(o.id) : 1; 103 124 } 104 125 126 @Override 105 127 public String getName() { 106 128 String name; … … 109 131 } else { 110 132 name = get("name"); 111 if (name == null) 133 if (name == null) { 112 134 name = id == 0 ? tr("node") : ""+id; 135 } 113 136 name += " (" + coor.latToString(mCord) + ", " + coor.lonToString(mCord) + ")"; 114 137 }
Note: See TracChangeset
for help on using the changeset viewer.
