home *** CD-ROM | disk | FTP | other *** search
Java Source | 1997-01-24 | 677 b | 45 lines |
- package COM.odi.demo.OSDraw;
-
- /**
- * <H3>Copyright (C) Object Design Inc. 1996, 1997</H3>
- */
-
- import COM.odi.*;
- import java.awt.Point;
-
- /*
- * Class OSLine is a persistence-capable class
- * Cannot be a discrete instance in the database
- */
-
- public class OSPoint {
-
- // Database fields
-
- private int x;
- private int y;
-
- public OSPoint(int x, int y) {
- this.x = x;
- this.y = y;
- }
-
- // Methods to indirectly access private fields
-
- public Point getPoint() {
- return new Point(x, y);
- }
-
- public void setPoint(Point point) {
- x = point.x;
- y = point.y;
- }
-
- // Default hashCode method
-
- public int hashCode() {
- return super.hashCode();
- }
- }
-
-