org.apache.lucene.geo

## Class XYRectangle2D

- java.lang.Object
- - org.apache.lucene.geo.XYRectangle2D

- All Implemented Interfaces:
    Component2D

      public class XYRectangle2D
      extends Object
      implements Component2D

  2D rectangle implementation containing cartesian spatial logic.
  NOTE: This API is for internal purposes only and might change in incompatible ways in the next release.

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from interface org.apache.lucene.geo.Component2D

      `Component2D.WithinRelation`

  - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `XYRectangle2D(double minX, double maxX, double minY, double maxY)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `contains(double x, double y)`
    `static Component2D` | `create(XYRectangle... rectangles)` create a component2D from provided array of rectangles
    `boolean` | `equals(Object o)`
    `double` | `getMaxX()`
    `double` | `getMaxY()`
    `double` | `getMinX()`
    `double` | `getMinY()`
    `int` | `hashCode()`
    `PointValues.Relation` | `relate(double minX, double maxX, double minY, double maxY)`
    `PointValues.Relation` | `relateTriangle(double minX, double maxX, double minY, double maxY, double ax, double ay, double bx, double by, double cx, double cy)`
    `String` | `toString()`
    `Component2D.WithinRelation` | `withinTriangle(double minX, double maxX, double minY, double maxY, double ax, double ay, boolean ab, double bx, double by, boolean bc, double cx, double cy, boolean ca)`

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

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

    - ### Methods inherited from interface org.apache.lucene.geo.Component2D

      `containsPoint, disjoint, pointInTriangle, relateTriangle, within, withinTriangle`

- - ### Constructor Detail

    - #### XYRectangle2D

          protected XYRectangle2D(double minX,
                                  double maxX,
                                  double minY,
                                  double maxY)

  - ### Method Detail

    - #### getMinX

          public double getMinX()

      Specified by:
        `getMinX` in interface `Component2D`

    - #### getMaxX

          public double getMaxX()

      Specified by:
        `getMaxX` in interface `Component2D`

    - #### getMinY

          public double getMinY()

      Specified by:
        `getMinY` in interface `Component2D`

    - #### getMaxY

          public double getMaxY()

      Specified by:
        `getMaxY` in interface `Component2D`

    - #### contains

          public boolean contains(double x,
                                  double y)

      Specified by:
        `contains` in interface `Component2D`

    - #### relate

          public PointValues.Relation relate(double minX,
                                             double maxX,
                                             double minY,
                                             double maxY)

      Specified by:
        `relate` in interface `Component2D`

    - #### relateTriangle

          public PointValues.Relation relateTriangle(double minX,
                                                     double maxX,
                                                     double minY,
                                                     double maxY,
                                                     double ax,
                                                     double ay,
                                                     double bx,
                                                     double by,
                                                     double cx,
                                                     double cy)

      Specified by:
        `relateTriangle` in interface `Component2D`

    - #### withinTriangle

          public Component2D.WithinRelation withinTriangle(double minX,
                                                           double maxX,
                                                           double minY,
                                                           double maxY,
                                                           double ax,
                                                           double ay,
                                                           boolean ab,
                                                           double bx,
                                                           double by,
                                                           boolean bc,
                                                           double cx,
                                                           double cy,
                                                           boolean ca)

      Specified by:
        `withinTriangle` in interface `Component2D`

    - #### 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`

    - #### create

          public static Component2D create(XYRectangle... rectangles)

      create a component2D from provided array of rectangles

Copyright © 2000-2020 Apache Software Foundation. All Rights Reserved.