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
-
Point(double, double)
- Creates a point object
-
equals(Object)
- Tests if this object equals another
-
getX()
- Gets the x coordinate of this point
-
getY()
- Gets the y coordinate of this point
-
hashCode()
- Computes a hash code for this object
-
move(double, double)
- Moves this graphical shape
-
toString()
- Creates a string representation of this object
Point
public Point(double xx,
double yy)
- Creates a point object
- Parameters:
- xx - the x coordinate
- yy - the y coordinate
getX
public double getX()
- Gets the x coordinate of this point
- Returns:
- the x coordinate of this point
getY
public double getY()
- Gets the y coordinate of this point
- Returns:
- the y coordinate of this point
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
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
toString
public String toString()
- Creates a string representation of this object
- Returns:
- a string representation of this object
- Overrides:
- toString in class Object
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