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:
  • Constructor Details

    • 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 Details

    • 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