Spring Data Core

org.springframework.data.geo
Class Circle

java.lang.Object
  extended by 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
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
 boolean equals(Object obj)
           
 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:

toString

public String toString()
Overrides:
toString in class Object

equals

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

hashCode

public int hashCode()
Overrides:
hashCode in class Object

Spring Data Core

Copyright © 2011-2014–2014 Pivotal Software, Inc.. All rights reserved.