Class Box

java.lang.Object
org.springframework.data.geo.Box
All Implemented Interfaces:
Serializable, Shape

public class Box extends Object implements Shape
Represents a geospatial box value
Since:
1.8
Author:
Mark Pollack, Oliver Gierke, Thomas Darimont
See Also:
  • Constructor Details

    • Box

      public Box(Point first, Point second)
      Creates a new Box spanning from the given first to the second Point.
      Parameters:
      first - must not be null.
      second - must not be null.
    • Box

      public Box(double[] first, double[] second)
      Creates a new Box from the given first to the second point represented as the double[].
      Parameters:
      first - must not be null and contain exactly 2 doubles.
      second - must not be null and contain exactly 2 doubles.
  • Method Details

    • getFirst

      public Point getFirst()
      Returns the first Point making up the Box.
      Returns:
    • getSecond

      public Point getSecond()
      Returns the second Point making up the Box.
      Returns:
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • hashCode

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

      public boolean equals(@Nullable Object obj)
      Overrides:
      equals in class Object