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

Class ccj.Circle

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

public class Circle
extends Shape

Constructor Index

 o Circle(Point, double)
Constructs a circle

Method Index

 o clone()
Creates a copy of this object
 o equals(Object)
Tests if this object equals another
 o getCenter()
Gets the center of the circle
 o getRadius()
Gets the radius of the circle
 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 Circle
  public Circle(Point c,
                double r)
Constructs a circle
Parameters:
c - the center of the circle
r - the radius of the circle

Methods

 o move
  public void move(double x,
                   double y)
Moves this graphical shape
Parameters:
dx - the amount to move by in x direction
dy - the amount to move by in y direction
 o getCenter
  public Point getCenter()
Gets the center of the circle
Returns:
the center of the circle
 o getRadius
  public double getRadius()
Gets the radius of the circle
Returns:
the radius of the circle
 o clone
  public Object clone()
Creates a copy of this object
Returns:
a copy of this object
Overrides:
clone in class Shape
 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 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 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