blob: 88e1d4bd022d7031eaf57d788322621a629b103c (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
|
/*******************************************************************************
* Copyright (c) 2004, 2007 Boeing.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Boeing - initial API and implementation
*******************************************************************************/
package org.eclipse.osee.framework.jdk.core.type;
/**
* @author Charles Shaw
*/
public class DoublePoint {
protected double x;
protected double y;
/**
* @param x The x coordinate of the point.
* @param y The y coordinate of the point.
*/
public DoublePoint(double x, double y) {
super();
this.x = x;
this.y = y;
}
public DoublePoint() {
super();
this.x = 0.0;
this.y = 0.0;
}
public double getX() {
return x;
}
public void setX(double x) {
this.x = x;
}
public double getY() {
return y;
}
public void setY(double y) {
this.y = y;
}
public boolean equals(Object object) {
boolean matches = false;
if (object instanceof DoublePoint) {
DoublePoint point = (DoublePoint) object;
matches = (point.x == this.x) && (point.y == this.y);
}
return matches;
}
public String toString() {
return "(" + x + ", " + y + ")";
}
}
|