public class Sphere extends Object implements org.springframework.data.geo.Shape
Constructor and Description |
---|
Sphere(org.springframework.data.geo.Circle circle)
Creates a Sphere from the given
Circle . |
Sphere(org.springframework.data.geo.Point center,
org.springframework.data.geo.Distance radius)
Creates a Sphere around the given center
Point with the given radius. |
Sphere(org.springframework.data.geo.Point center,
double radius)
Creates a Sphere around the given center
Point with the given radius. |
Modifier and Type | Method and Description |
---|---|
List<? extends Object> |
asList()
|
boolean |
equals(Object obj) |
org.springframework.data.geo.Point |
getCenter()
Returns the center of the
Circle . |
String |
getCommand()
Returns the command to be used to create the $within criterion.
|
org.springframework.data.geo.Distance |
getRadius()
Returns the radius of the
Circle . |
int |
hashCode() |
String |
toString() |
public static final String COMMAND
public Sphere(org.springframework.data.geo.Point center, org.springframework.data.geo.Distance radius)
Point
with the given radius.center
- must not be null.radius
- must not be null.public Sphere(org.springframework.data.geo.Point center, double radius)
Point
with the given radius.center
- radius
- public Sphere(org.springframework.data.geo.Circle circle)
Circle
.circle
- public org.springframework.data.geo.Point getCenter()
Circle
.public org.springframework.data.geo.Distance getRadius()
Circle
.public List<? extends Object> asList()
Shape
as a list of usually Double
or List
s of Double
s. Wildcard bound
to allow implementations to return a more concrete element type.public String getCommand()
Copyright © 2011–2017 Pivotal Software, Inc.. All rights reserved.