Package org.apache.lucene.geo
Class XYLine
java.lang.Object
org.apache.lucene.geo.XYGeometry
org.apache.lucene.geo.XYLine
Represents a line in cartesian space. You can construct the Line directly with
float[]
,
float[]
x, y arrays coordinates.-
Field Summary
-
Constructor Summary
ConstructorDescriptionXYLine
(float[] x, float[] y) Creates a new Line from the supplied X/Y array. -
Method Summary
Modifier and TypeMethodDescriptionboolean
float[]
getX()
Returns a copy of the internal x arrayfloat
getX
(int vertex) Returns x value at given indexfloat[]
getY()
Returns a copy of the internal y arrayfloat
getY
(int vertex) Returns y value at given indexint
hashCode()
int
returns the number of vertex pointsprotected Component2D
get a Component2D from this objecttoString()
Methods inherited from class org.apache.lucene.geo.XYGeometry
create
-
Field Details
-
minX
public final float minXminimum x of this line's bounding box -
maxX
public final float maxXmaximum y of this line's bounding box -
minY
public final float minYminimum y of this line's bounding box -
maxY
public final float maxYmaximum y of this line's bounding box
-
-
Constructor Details
-
XYLine
public XYLine(float[] x, float[] y) Creates a new Line from the supplied X/Y array.
-
-
Method Details
-
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
Description copied from class:XYGeometry
get a Component2D from this object- Specified by:
toComponent2D
in classXYGeometry
-
equals
-
hashCode
public int hashCode() -
toString
-