public class Polygon extends LinkedList<List<Point>> implements IGeoCoordinates
modCount| Constructor and Description |
|---|
Polygon(Collection<List<Point>> shapes)
Constructor that requires a collection of rings.
|
Polygon(com.google.gson.JsonArray array)
Constructor that requires a JsonArray of rings.
|
Polygon(List<Point> filledShape)
Constructor that creates a single shape without any holes.
|
Polygon(List<Point> filledShape,
Collection<List<Point>> holes)
Constructor that creates a shape with holes.
|
| Modifier and Type | Method and Description |
|---|---|
List<Point> |
getFilledShape()
Returns the filled shape of the polygon.
|
List<List<Point>> |
getHoles()
Returns a list of all holes.
|
boolean |
hasHoles()
Checks if holes exist in the polygon.
|
void |
removeAllHoles()
Removes all holes of the polygon.
|
void |
setFilledShape(List<Point> shape)
Changes the filled shape of the polygon witout changing the holes.
|
add, add, addAll, addAll, addFirst, addLast, clear, clone, contains, descendingIterator, element, get, getFirst, getLast, indexOf, lastIndexOf, listIterator, offer, offerFirst, offerLast, peek, peekFirst, peekLast, poll, pollFirst, pollLast, pop, push, remove, remove, remove, removeFirst, removeFirstOccurrence, removeLast, removeLastOccurrence, set, size, spliterator, toArray, toArrayiteratorequals, hashCode, listIterator, removeRange, subListcontainsAll, isEmpty, removeAll, retainAll, toStringfinalize, getClass, notify, notifyAll, wait, wait, waitcontainsAll, equals, hashCode, isEmpty, iterator, listIterator, removeAll, replaceAll, retainAll, sort, subListparallelStream, removeIf, streampublic Polygon(List<Point> filledShape)
filledShape - a list of points that must form a ringpublic Polygon(List<Point> filledShape, Collection<List<Point>> holes)
filledShape - a list of points that must form a ring, defining the filled shapeholes - a list of rings of coordinates, where each ring defines a hole in the filledShapepublic Polygon(Collection<List<Point>> shapes)
shapes - a collection of coordinate ringspublic Polygon(com.google.gson.JsonArray array)
array - a JsonArray of coordinate ringspublic boolean hasHoles()
public List<Point> getFilledShape()
public void setFilledShape(List<Point> shape)
shape - a ring of coordinates, defining a shapepublic List<List<Point>> getHoles()
public void removeAllHoles()
Copyright © 2017–2018. All rights reserved.