public class PolygonImpl extends Object implements Polygon, Spatial4jShapeProvider, Externalizable
Constructor and Description |
---|
PolygonImpl() |
PolygonImpl(Point[] points) |
Modifier and Type | Method and Description |
---|---|
StringBuilder |
appendTo(StringBuilder stringBuilder,
ShapeFormat shapeFormat)
Appends a string representation of the shape using the specified format
|
boolean |
equals(Object o) |
int |
getNumOfPoints()
Returns the number of points within the polygon
|
com.spatial4j.core.shape.Shape |
getSpatial4jShape(com.spatial4j.core.context.SpatialContext spatialContext)
Gets a Spatial4j shape from the current object
|
double |
getX(int index)
Gets the X coordinate of the point in the specified index.
|
double |
getY(int index)
Gets the Y coordinate of the point in the specified index.
|
int |
hashCode() |
void |
readExternal(ObjectInput in) |
String |
toString() |
String |
toString(ShapeFormat shapeFormat)
Returns a string representation of the shape using the specified format.
|
void |
writeExternal(ObjectOutput out) |
public PolygonImpl()
public PolygonImpl(Point[] points)
public int getNumOfPoints()
Polygon
getNumOfPoints
in interface Polygon
public double getX(int index)
Polygon
public double getY(int index)
Polygon
public String toString(ShapeFormat shapeFormat)
Shape
public StringBuilder appendTo(StringBuilder stringBuilder, ShapeFormat shapeFormat)
Shape
public com.spatial4j.core.shape.Shape getSpatial4jShape(com.spatial4j.core.context.SpatialContext spatialContext)
Spatial4jShapeProvider
getSpatial4jShape
in interface Spatial4jShapeProvider
spatialContext
- The SpatialContext which will be used to construct the shape, if
needed.public void writeExternal(ObjectOutput out) throws IOException
writeExternal
in interface Externalizable
IOException
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
readExternal
in interface Externalizable
IOException
ClassNotFoundException
Copyright © GigaSpaces.