net.mazewar
Class Point

java.lang.Object
  extended by net.mazewar.Point
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
DirectedPoint

public class Point
extends java.lang.Object
implements java.io.Serializable

An integral representation of a point in two dimensional space.

Version:
$Id: Point.java 339 2004-01-23 20:06:22Z geoffw $
Author:
Geoffrey Washburn <geoffw@cis.upenn.edu>
See Also:
Serialized Form

Constructor Summary
Point(int x, int y)
          Create a new Point from coordinates.
Point(Point point)
          Create a new Point from another Point.
 
Method Summary
 int getX()
          Obtain the X-coordinate of this Point.
 int getY()
          Obtain the Y-coordinate of this Point.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Point

public Point(int x,
             int y)
Create a new Point from coordinates.

Parameters:
x - Coordinate in the X-dimension.
y - Coordinate in the Y-dimension.

Point

public Point(Point point)
Create a new Point from another Point.

Parameters:
point - Point to copy from.
Method Detail

getX

public int getX()
Obtain the X-coordinate of this Point.

Returns:
The X-coordinate of this Point.

getY

public int getY()
Obtain the Y-coordinate of this Point.

Returns:
The Y-coordinate of this Point.