Package org.apache.lucene.geo

# Class XYRectangle

java.lang.Object
org.apache.lucene.geo.Geometry
org.apache.lucene.geo.XYGeometry
org.apache.lucene.geo.XYRectangle

public final class XYRectangle extends XYGeometry
Represents a x/y cartesian rectangle.

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `final float`
  `maxX`
  minimum y value
  `final float`
  `maxY`
  maximum y value
  `final float`
  `minX`
  minimum x value
  `final float`
  `minY`
  maximum x value

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `XYRectangle(float minX, float maxX, float minY, float maxY)`
  Constructs a bounding box by first validating the provided x and y coordinates

- ## Method Summary

  Modifier and Type
  Method
  Description
  `boolean`
  `equals(Object o)`
  `static XYRectangle`
  `fromPointDistance(float x, float y, float radius)`
  Compute Bounding Box for a circle in cartesian geometry
  `int`
  `hashCode()`
  `protected Component2D`
  `toComponent2D()`
  get a Component2D from the geometry object
  `String`
  `toString()`

  ### Methods inherited from class org.apache.lucene.geo.XYGeometry

  `create`

  ### Methods inherited from class java.lang.Object

  `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- ## Field Details

  - ### minX

    public final float minX
    minimum x value

  - ### maxX

    public final float maxX
    minimum y value

  - ### minY

    public final float minY
    maximum x value

  - ### maxY

    public final float maxY
    maximum y value

- ## Constructor Details

  - ### XYRectangle

    public XYRectangle(float minX, float maxX, float minY, float maxY)
    Constructs a bounding box by first validating the provided x and y coordinates

- ## Method Details

  - ### toComponent2D

    protected Component2D toComponent2D()
    Description copied from class: `Geometry`
    get a Component2D from the geometry object
    Specified by:
      `toComponent2D` in class `Geometry`

  - ### equals

    public boolean equals(Object o)
    Overrides:
      `equals` in class `Object`

  - ### fromPointDistance

    public static XYRectangle fromPointDistance(float x, float y, float radius)
    Compute Bounding Box for a circle in cartesian geometry

  - ### hashCode

    public int hashCode()
    Overrides:
      `hashCode` in class `Object`

  - ### toString

    public String toString()
    Overrides:
      `toString` in class `Object`