Class ccj.Point
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class ccj.Point

java.lang.Object
   |
   +----ccj.Shape
           |
           +----ccj.Point

public class Point
extends Shape

Constructor Index

 o Point(double, double)
Creates a point object

Method Index

 o equals(Object)
Tests if this object equals another
 o getX()
Gets the x coordinate of this point
 o getY()
Gets the y coordinate of this point
 o hashCode()
Computes a hash code for this object
 o move(double, double)
Moves this graphical shape
 o toString()
Creates a string representation of this object

Constructors

 o Point
  public Point(double xx,
               double yy)
Creates a point object
Parameters:
xx - the x coordinate
yy - the y coordinate

Methods

 o getX
  public double getX()
Gets the x coordinate of this point
Returns:
the x coordinate of this point
 o getY
  public double getY()
Gets the y coordinate of this point
Returns:
the y coordinate of this point
 o move
  public void move(double dx,
                   double dy)
Moves this graphical shape
Parameters:
dx - the amount to move by in x direction
dy - the amount to move by in y direction
 o equals
  public boolean equals(Object b)
Tests if this object equals another
Parameters:
b - the object to compare with
Returns:
true if the two objects are equal
Overrides:
equals in class Object
 o toString
  public String toString()
Creates a string representation of this object
Returns:
a string representation of this object
Overrides:
toString in class Object
 o hashCode
  public int hashCode()
Computes a hash code for this object
Returns:
a hash code for this object
Overrides:
hashCode in class Object

All Packages  Class Hierarchy  This Package  Previous  Next  Index