Class BoundingBox

java.lang.Object
org.dizitart.no2.index.BoundingBox
All Implemented Interfaces:
Serializable

public class BoundingBox extends Object implements Serializable
Represents a bounding box for spatial indexing.
Author:
Anindya Chatterjee
See Also:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final BoundingBox
    An empty bounding box.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
    BoundingBox(float minX, float maxX, float minY, float maxY)
    Creates a new BoundingBox instance.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
     
    float
    Returns the maximum x-coordinate of the bounding box.
    float
    Returns the maximum Y coordinate of the bounding box.
    float
    Returns the minimum x-coordinate of the bounding box.
    float
    Returns the minimum y-coordinate of the bounding box.
    int
     
    void
    setMaxX(float maxX)
    Returns the maximum x-coordinate of the bounding box.
    void
    setMaxY(float maxY)
    Returns the maximum Y coordinate of the bounding box.
    void
    setMinX(float minX)
    Returns the minimum x-coordinate of the bounding box.
    void
    setMinY(float minY)
    Returns the minimum y-coordinate of the bounding box.
     

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait
  • Field Details

    • EMPTY

      public static final BoundingBox EMPTY
      An empty bounding box.
  • Constructor Details

    • BoundingBox

      public BoundingBox()
    • BoundingBox

      public BoundingBox(float minX, float maxX, float minY, float maxY)
      Creates a new BoundingBox instance.
      Parameters:
      minX - Returns the minimum x-coordinate of the bounding box.
      maxX - Returns the maximum x-coordinate of the bounding box.
      minY - Returns the minimum y-coordinate of the bounding box.
      maxY - Returns the maximum Y coordinate of the bounding box.
  • Method Details

    • getMinX

      public float getMinX()
      Returns the minimum x-coordinate of the bounding box.
      Returns:
      the minimum x-coordinate of the bounding box.
    • getMaxX

      public float getMaxX()
      Returns the maximum x-coordinate of the bounding box.
      Returns:
      the maximum x-coordinate of the bounding box
    • getMinY

      public float getMinY()
      Returns the minimum y-coordinate of the bounding box.
      Returns:
      the minimum y-coordinate of the bounding box
    • getMaxY

      public float getMaxY()
      Returns the maximum Y coordinate of the bounding box.
      Returns:
      the maximum Y coordinate of the bounding box.
    • setMinX

      public void setMinX(float minX)
      Returns the minimum x-coordinate of the bounding box.
    • setMaxX

      public void setMaxX(float maxX)
      Returns the maximum x-coordinate of the bounding box.
    • setMinY

      public void setMinY(float minY)
      Returns the minimum y-coordinate of the bounding box.
    • setMaxY

      public void setMaxY(float maxY)
      Returns the maximum Y coordinate of the bounding box.
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

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

      public String toString()
      Overrides:
      toString in class Object