Class XYCircle


public final class XYCircle extends XYGeometry
Represents a circle on the XY plane.

NOTES:

  1. X/Y precision is float.
  2. Radius precision is float.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private final float
    radius
    private final float
    Center x
    private final float
    Center y
  • Constructor Summary

    Constructors
    Constructor
    Description
    XYCircle(float x, float y, float radius)
    Creates a new circle from the supplied x/y center and radius.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
     
    float
    Returns the radius
    float
    Returns the center's x
    float
    Returns the center's y
    int
     
    protected Component2D
    get a Component2D from the geometry object
     

    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

    • x

      private final float x
      Center x
    • y

      private final float y
      Center y
    • radius

      private final float radius
      radius
  • Constructor Details

    • XYCircle

      public XYCircle(float x, float y, float radius)
      Creates a new circle from the supplied x/y center and radius.
  • Method Details

    • getX

      public float getX()
      Returns the center's x
    • getY

      public float getY()
      Returns the center's y
    • getRadius

      public float getRadius()
      Returns the radius
    • 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
    • hashCode

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

      public String toString()
      Overrides:
      toString in class Object