Class BoundingBox
java.lang.Object
org.springframework.data.redis.domain.geo.BoundingBox
- All Implemented Interfaces:
Serializable,org.springframework.data.geo.Shape
Represents a geospatial bounding box defined by width and height.
- Since:
- 2.6
- Author:
- Mark Paluch
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionBoundingBox(double width, double height, org.springframework.data.geo.Metric metric) Creates a newBoundingBoxfrom the given width, height andMetric.BoundingBox(org.springframework.data.geo.Distance width, org.springframework.data.geo.Distance height) Creates a newBoundingBoxfrom the given width and height. -
Method Summary
-
Constructor Details
-
BoundingBox
public BoundingBox(org.springframework.data.geo.Distance width, org.springframework.data.geo.Distance height) Creates a newBoundingBoxfrom the given width and height. Both distances must use the sameMetric.- Parameters:
width- must not be null.height- must not be null.
-
BoundingBox
public BoundingBox(double width, double height, org.springframework.data.geo.Metric metric) Creates a newBoundingBoxfrom the given width, height andMetric.- Parameters:
width-height-metric- must not be null.
-
-
Method Details
-
getWidth
public org.springframework.data.geo.Distance getWidth()Returns the width of this bounding box.- Returns:
- will never be null.
-
getHeight
public org.springframework.data.geo.Distance getHeight()Returns the height of this bounding box.- Returns:
- will never be null.
-
hashCode
public int hashCode() -
equals
-
toString
-