net.moioli.chart
Class IntPoint

java.lang.Object
  extended by net.moioli.chart.IntPoint

public class IntPoint
extends java.lang.Object

Represents a point on a cartesian plane with integer coordinate.

Version:
2005/10/5
Author:
Silvio Moioli

Field Summary
 int x
          The x coordinate.
 int y
          The y coordinate.
 
Constructor Summary
IntPoint()
          Constructs the point (0,0).
IntPoint(int x, int y)
          Standard constructor.
IntPoint(IntPoint p)
          Copy constructor.
 
Method Summary
 double getX()
          Returns x.
 double getY()
          Returns y.
 void setX(int x)
          Sets the x value.
 void setY(int y)
          Sets the y value.
 java.lang.String toString()
          Returns a representaive string.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

x

public int x
The x coordinate.


y

public int y
The y coordinate.

Constructor Detail

IntPoint

public IntPoint()
Constructs the point (0,0).


IntPoint

public IntPoint(IntPoint p)
Copy constructor.

Parameters:
p - the point to be copied

IntPoint

public IntPoint(int x,
                int y)
Standard constructor.

Parameters:
x - the point's x coordinate
y - the point's y coordinate
Method Detail

getX

public double getX()
Returns x.

Returns:
x value

getY

public double getY()
Returns y.

Returns:
y value

toString

public java.lang.String toString()
Returns a representaive string.

Overrides:
toString in class java.lang.Object
Returns:
a string in the (x,y) format

setX

public void setX(int x)
Sets the x value.

Parameters:
x - the new x coordinate

setY

public void setY(int y)
Sets the y value.

Parameters:
y - the new y coordinate