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 boolean
equals(Object o)
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
numPoints()
returns the number of vertex pointsprotected Component2D
toComponent2D()
get a Component2D from the geometry objectString
toString()
-
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:Geometry
get a Component2D from the geometry object- Specified by:
toComponent2D
in classGeometry
-
-