forked from ObjectLayout/ObjectLayout
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPoint.java
More file actions
46 lines (37 loc) · 818 Bytes
/
Point.java
File metadata and controls
46 lines (37 loc) · 818 Bytes
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
/*
* Written by Gil Tene, and released to the public domain,
* as explained at http://creativecommons.org/publicdomain/zero/1.0/
*/
/**
* A simple x,y point class to be used as an element in various other examples.
*
*/
public class Point {
private long x;
private long y;
public Point() {
}
public Point (final long x, final long y) {
this.x = x;
this.y = y;
}
public Point(final Point source) {
this(source.x, source.y);
}
public long getX() {
return x;
}
public void setX(final long x) {
this.x = x;
}
public long getY() {
return y;
}
public void setY(final long y) {
this.y = y;
}
public void set(final long x, final long y) {
this.x = x;
this.y = y;
}
}