Class LineStringImpl
java.lang.Object
org.openspaces.spatial.shapes.impl.LineStringImpl
- All Implemented Interfaces:
Externalizable,Serializable,LineString,Shape,Spatial4jShapeProvider
public class LineStringImpl
extends Object
implements LineString, Spatial4jShapeProvider, Externalizable
- Since:
- 11.0
- Author:
- Niv Ingberg
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionappendTo(StringBuilder stringBuilder, ShapeFormat shapeFormat) Appends a string representation of the shape using the specified formatbooleanintReturns the number of points within the line stringorg.locationtech.spatial4j.shape.ShapegetSpatial4jShape(org.locationtech.spatial4j.context.SpatialContext spatialContext) Gets a Spatial4j shape from the current objectdoublegetX(int index) Gets the X coordinate of the point in the specified index.doublegetY(int index) Gets the Y coordinate of the point in the specified index.inthashCode()voidtoString()toString(ShapeFormat shapeFormat) Returns a string representation of the shape using the specified format.void
-
Constructor Details
-
LineStringImpl
public LineStringImpl() -
LineStringImpl
-
-
Method Details
-
getNumOfPoints
public int getNumOfPoints()Description copied from interface:LineStringReturns the number of points within the line string- Specified by:
getNumOfPointsin interfaceLineString- Returns:
- The number of points within the line string
-
getX
public double getX(int index) Description copied from interface:LineStringGets the X coordinate of the point in the specified index.- Specified by:
getXin interfaceLineString
-
getY
public double getY(int index) Description copied from interface:LineStringGets the Y coordinate of the point in the specified index.- Specified by:
getYin interfaceLineString
-
equals
-
hashCode
public int hashCode() -
toString
-
toString
Description copied from interface:ShapeReturns a string representation of the shape using the specified format. -
appendTo
Description copied from interface:ShapeAppends a string representation of the shape using the specified format -
getSpatial4jShape
public org.locationtech.spatial4j.shape.Shape getSpatial4jShape(org.locationtech.spatial4j.context.SpatialContext spatialContext) Description copied from interface:Spatial4jShapeProviderGets a Spatial4j shape from the current object- Specified by:
getSpatial4jShapein interfaceSpatial4jShapeProvider- Parameters:
spatialContext- The SpatialContext which will be used to construct the shape, if needed.- Returns:
- A Spatial4j shape
-
writeExternal
- Specified by:
writeExternalin interfaceExternalizable- Throws:
IOException
-
readExternal
- Specified by:
readExternalin interfaceExternalizable- Throws:
IOExceptionClassNotFoundException
-