Package org.apache.lucene.geo
Class XYLine
- java.lang.Object
-
- org.apache.lucene.geo.XYGeometry
-
- org.apache.lucene.geo.XYLine
-
public class XYLine extends XYGeometry
Represents a line in cartesian space. You can construct the Line directly withfloat[],float[]x, y arrays coordinates.
-
-
Field Summary
Fields Modifier and Type Field Description floatmaxXmaximum y of this line's bounding boxfloatmaxYmaximum y of this line's bounding boxfloatminXminimum x of this line's bounding boxfloatminYminimum y of this line's bounding boxprivate float[]xarray of x coordinatesprivate float[]yarray of y coordinates
-
Constructor Summary
Constructors Constructor Description XYLine(float[] x, float[] y)Creates a new Line from the supplied X/Y array.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object o)float[]getX()Returns a copy of the internal x arrayfloatgetX(int vertex)Returns x value at given indexfloat[]getY()Returns a copy of the internal y arrayfloatgetY(int vertex)Returns y value at given indexinthashCode()intnumPoints()returns the number of vertex pointsprotected Component2DtoComponent2D()get a Component2D from this objectjava.lang.StringtoString()-
Methods inherited from class org.apache.lucene.geo.XYGeometry
create
-
-
-
-
Field Detail
-
x
private final float[] x
array of x coordinates
-
y
private final float[] y
array of y coordinates
-
minX
public final float minX
minimum x of this line's bounding box
-
maxX
public final float maxX
maximum y of this line's bounding box
-
minY
public final float minY
minimum y of this line's bounding box
-
maxY
public final float maxY
maximum y of this line's bounding box
-
-
Method Detail
-
numPoints
public int numPoints()
returns the number of vertex points
-
getX
public float getX(int vertex)
Returns x value at given index
-
getY
public float getY(int vertex)
Returns y value at given index
-
getX
public float[] getX()
Returns a copy of the internal x array
-
getY
public float[] getY()
Returns a copy of the internal y array
-
toComponent2D
protected Component2D toComponent2D()
Description copied from class:XYGeometryget a Component2D from this object- Specified by:
toComponent2Din classXYGeometry
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-