Revision 42875 trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.geometry/org.gvsig.fmap.geometry.jts/src/main/java/org/gvsig/fmap/geom/jts/primitive/curve/line/Line3D.java
Line3D.java | ||
---|---|---|
77 | 77 |
return OpenJUMPUtils.offsetCleanOpenLine(this.coordinates, distance); |
78 | 78 |
} |
79 | 79 |
} |
80 |
|
|
81 |
@Override |
|
82 |
public boolean equals(Object obj) { |
|
83 |
boolean res = super.equals(obj); |
|
84 |
if(res && obj instanceof Line3D){ |
|
85 |
Line3D other = (Line3D)obj; |
|
86 |
if(this.getNumVertices() != other.getNumVertices()){ |
|
87 |
return false; |
|
88 |
} |
|
89 |
for(int i=0; i < this.getNumVertices(); i++){ |
|
90 |
Coordinate coordinate = this.coordinates.get(i); |
|
91 |
Coordinate otherCoordinate = other.coordinates.get(i); |
|
92 |
if (otherCoordinate.getOrdinate(2) != coordinate.getOrdinate(2)) { |
|
93 |
return false; |
|
94 |
} |
|
95 |
} |
|
96 |
return true; |
|
97 |
} else { |
|
98 |
return false; |
|
99 |
} |
|
100 |
} |
|
101 |
|
|
80 | 102 |
} |
Also available in: Unified diff