Class PolygonImpl
java.lang.Object
org.openspaces.spatial.shapes.impl.PolygonImpl
- All Implemented Interfaces:
Externalizable,Serializable,Polygon,Shape,Spatial4jShapeProvider
- Since:
- 11.0
- Author:
- Yohana Khoury
- 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 polygonorg.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
-
PolygonImpl
public PolygonImpl() -
PolygonImpl
-
-
Method Details
-
getNumOfPoints
public int getNumOfPoints()Description copied from interface:PolygonReturns the number of points within the polygon- Specified by:
getNumOfPointsin interfacePolygon- Returns:
- The number of points within the polygon
-
getX
public double getX(int index) Description copied from interface:PolygonGets the X coordinate of the point in the specified index. -
getY
public double getY(int index) Description copied from interface:PolygonGets the Y coordinate of the point in the specified index. -
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
-