Class BoundingBox

java.lang.Object
org.springframework.data.redis.domain.geo.BoundingBox
All Implemented Interfaces:
Serializable, Shape

public class BoundingBox extends Object implements Shape
Represents a geospatial bounding box defined by width and height.
Since:
2.6
Author:
Mark Paluch
See Also:
  • Constructor Details

    • BoundingBox

      public BoundingBox(Distance width, Distance height)
      Creates a new BoundingBox from the given width and height. Both distances must use the same Metric.
      Parameters:
      width - must not be null.
      height - must not be null.
    • BoundingBox

      public BoundingBox(double width, double height, Metric metric)
      Creates a new BoundingBox from the given width, height and Metric.
      Parameters:
      width -
      height -
      metric - must not be null.
  • Method Details

    • getWidth

      public Distance getWidth()
      Returns the width of this bounding box.
      Returns:
      will never be null.
    • getHeight

      public Distance getHeight()
      Returns the height of this bounding box.
      Returns:
      will never be null.
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(@Nullable Object o)
      Overrides:
      equals in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object