KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > ojb > broker > Point


1 package org.apache.ojb.broker;
2
3
4 /**
5  * Point serves for graphic representation of graphs.
6  * @author Oleg Nitz
7  */

8 public class Point implements java.io.Serializable JavaDoc
9 {
10     private int id;
11     private int x;
12     private int y;
13
14     public Point()
15     {
16     }
17
18     public Point(int id, int x, int y)
19     {
20         this.id = id;
21         this.x = x;
22         this.y = y;
23     }
24
25     public Point(int x, int y)
26     {
27         this.x = x;
28         this.y = y;
29     }
30
31
32     public int getX()
33     {
34         return x;
35     }
36
37     public int getY()
38     {
39         return y;
40     }
41
42     public int getId()
43     {
44         return id;
45     }
46
47     public void setX(int x)
48     {
49         this.x = x;
50     }
51
52     public void setY(int y)
53     {
54         this.y = y;
55     }
56
57     public void setId(int id)
58     {
59         this.id = id;
60     }
61
62     public String JavaDoc toString()
63     {
64         return "(" + x + "," + y + ")";
65     }
66 }
67
Popular Tags