|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.gcube.indexmanagement.geo.shape.Polygon
public class Polygon
A java representation of a Polygon
| Constructor Summary | |
|---|---|
Polygon()
Constructor |
|
Polygon(Collection<Point> vertices)
Constructor which creates a polygon from a collection of points representing the vertices |
|
Polygon(Point[] vertices)
Constructor which creates a polygon from an array of points representing the vertices |
|
| Method Summary | |
|---|---|
void |
addVertex(Point vertex)
A method to add a vertex to the polygon |
void |
addVertices(Collection<Point> vertices)
A method to add a collection of vertices to the polygon |
void |
addVertices(Point[] vertices)
A method to add an array of vertices to the polygon |
Rectangle |
getBoundingBox()
A method to get the Minimum Bounding Rectanngle of the polygon |
Point[] |
getVertexArray()
A method to get an array of the vertices of the polygon |
ArrayList<Point> |
getVertices()
A method to get an ArrayList of the vertices of the polygon |
boolean |
isValid()
A method to check the validity of the polygon. |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Polygon()
public Polygon(Collection<Point> vertices)
vertices - -
collection of points representing the vertices of the polygon
to be createdpublic Polygon(Point[] vertices)
vertices - -
an array of points representing the vertices of the polygon to
be created| Method Detail |
|---|
public void addVertex(Point vertex)
vertex - -
The vertex to be added to the polygonpublic void addVertices(Collection<Point> vertices)
vertices - -
a collection of vertices to be added to the polygonpublic void addVertices(Point[] vertices)
vertices - -
an array of vertices to be added to the polygonpublic ArrayList<Point> getVertices()
public Point[] getVertexArray()
public Rectangle getBoundingBox()
public boolean isValid()
public String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||