public boolean equals3D(Coordinate other){
  return (x == other.x) && (y == other.y) && ((z == other.z) || (Double.isNaN(z) && Double.isNaN(other.z)));
}

public boolean equals3D ( Coordinate other ) { return ( x == other . x ) && ( y == other . y ) && ( ( z == other . z ) || ( Double . isNaN ( z ) && Double . isNaN ( other . z ) ) ) ; }
tests if another coordinate has the same values for the x , y and z ordinates .
