org.springframework.data.geo

## Class Circle

- java.lang.Object
- - org.springframework.data.geo.Circle

All Implemented Interfaces:
  Serializable, Shape

    public class Circle
    extends Object
    implements Shape

Represents a geospatial circle value

Since:
  1.8
Author:
  Mark Pollack, Oliver Gierke, Thomas Darimont
See Also:
  Serialized Form

### Constructor Summary

Constructors
Constructor and Description
`Circle(double centerX, double centerY, double radius)` Creates a new `Circle` from the given coordinates and radius as `Distance` with a `Metrics.NEUTRAL`.
`Circle(Point center, Distance radius)` Creates a new `Circle` from the given `Point` and radius.
`Circle(Point center, double radius)` Creates a new `Circle` from the given `Point` and radius.

### Method Summary

All Methods Instance Methods Concrete Methods
`boolean` `equals(Object o)`
`Point` `getCenter()` Returns the center of the `Circle`.
`Distance` `getRadius()` Returns the radius of the `Circle`.
`int` `hashCode()`
`String` `toString()`

### Methods inherited from class java.lang.Object

`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

### Constructor Detail

#### Circle

    public Circle(Point center,
                  Distance radius)

Creates a new `Circle` from the given `Point` and radius.

Parameters:
  `center` - must not be null.
  `radius` - must not be null and it's value greater or equal to zero.

#### Circle

    public Circle(Point center,
                  double radius)

Creates a new `Circle` from the given `Point` and radius.

Parameters:
  `center` - must not be null.
  `radius's` - value must be greater or equal to zero.

#### Circle

    public Circle(double centerX,
                  double centerY,
                  double radius)

Creates a new `Circle` from the given coordinates and radius as `Distance` with a `Metrics.NEUTRAL`.

Parameters:
  `centerX` -
  `centerY` -
  `radius` - must be greater or equal to zero.

### Method Detail

#### getCenter

    public Point getCenter()

Returns the center of the `Circle`.

Returns:
  will never be null.

#### getRadius

    public Distance getRadius()

Returns the radius of the `Circle`.

Returns:

#### equals

    public boolean equals(Object o)

Overrides:
  `equals` in class `Object`

#### hashCode

    public int hashCode()

Overrides:
  `hashCode` in class `Object`

#### toString

    public String toString()

Overrides:
  `toString` in class `Object`