Package il.ac.idc.jdt

Class Circle

java.lang.Object
il.ac.idc.jdt.Circle
All Implemented Interfaces:
Serializable

public class Circle extends Object implements Serializable
this class represents a simple circle.
it is used by the Delaunay Triangulation class.

note that this class is immutable.
See Also:
  • Constructor Details

    • Circle

      public Circle(Point c, double r)
      Constructor.
      Constructs a new Circle
      Parameters:
      c - Center of the circle.
      r - Radius of the circle.
    • Circle

      public Circle(Circle circ)
      Copy Constructor.
      Creates a new Circle with same properties of circ.
      Parameters:
      circ - Circle to clone.
  • Method Details

    • toString

      public String toString()
      Overrides:
      toString in class Object
    • center

      public Point center()
      Gets the center of the circle.
      Returns:
      the center of the circle.
    • radius

      public double radius()
      Gets the radius of the circle.
      Returns:
      the radius of the circle.
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object