Class BoundingBox

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

public class BoundingBox extends Object implements 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

    Constructors
    Constructor
    Description
    BoundingBox(double width, double height, org.springframework.data.geo.Metric metric)
    Creates a new BoundingBox from the given width, height and Metric.
    BoundingBox(org.springframework.data.geo.Distance width, org.springframework.data.geo.Distance height)
    Creates a new BoundingBox from the given width and height.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
     
    org.springframework.data.geo.Distance
    Returns the height of this bounding box.
    org.springframework.data.geo.Distance
    Returns the width of this bounding box.
    int
     
     

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • BoundingBox

      public BoundingBox(org.springframework.data.geo.Distance width, org.springframework.data.geo.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, org.springframework.data.geo.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 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()
      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