Package org.apache.lucene.geo
Class XYLine
- java.lang.Object
-
- org.apache.lucene.geo.Geometry
-
- 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.
-
-
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(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 the geometry objectStringtoString()-
Methods inherited from class org.apache.lucene.geo.XYGeometry
create
-
-
-
-
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:Geometryget a Component2D from the geometry object- Specified by:
toComponent2Din classGeometry
-
-