Package net.pl3x.map.core.markers.marker
Class MultiPolygon
- All Implemented Interfaces:
JsonSerializable
Represents a multi-polygon marker.
-
Constructor Summary
ConstructorsConstructorDescriptionMultiPolygon
(String key, Collection<Polygon> polygons) Create a new multi-polygon.MultiPolygon
(String key, Polygon polygon) Create a new multi-polygon.MultiPolygon
(String key, Polygon... polygons) Create a new multi-polygon. -
Method Summary
Modifier and TypeMethodDescriptionaddPolygon
(Collection<Polygon> polygons) Add polygons to this multi-polygon.addPolygon
(Polygon polygon) Add a polygon to this multi-polygon.addPolygon
(Polygon... polygons) Add polygons to this multi-polygon.Clear the list of polygons in this multi-polygon.boolean
static MultiPolygon
fromJson
(com.google.gson.JsonObject obj) Get the list of polygons in this multi-polygon.int
hashCode()
static MultiPolygon
of
(String key, Collection<Polygon> polygons) Create a new multi-polygon.static MultiPolygon
Create a new multi-polygon.static MultiPolygon
Create a new multi-polygon.removePoly
(Collection<Polygon> polygons) Remove polygons from this multi-polygon.removePoly
(Polygon polygon) Remove a polygon from this multi-polygon.removePoly
(Polygon... polygons) Remove polygons from this multi-polygon.com.google.gson.JsonObject
toJson()
Jsonify this object.toString()
Methods inherited from class net.pl3x.map.core.markers.marker.Marker
circle, circle, ellipse, ellipse, ellipse, ellipse, ellipse, ellipse, ellipse, ellipse, getOptions, getPane, getType, icon, icon, icon, icon, icon, icon, icon, multiPolygon, multiPolygon, multiPolygon, multiPolyline, multiPolyline, multiPolyline, polygon, polygon, polygon, polyline, polyline, polyline, rectangle, rectangle, setOptions, setOptions, setPane
-
Constructor Details
-
MultiPolygon
Create a new multi-polygon.- Parameters:
key
- identifying keypolygon
- polygon to add
-
MultiPolygon
Create a new multi-polygon.- Parameters:
key
- identifying keypolygons
- polygons to add
-
MultiPolygon
Create a new multi-polygon.- Parameters:
key
- identifying keypolygons
- polygons to add
-
-
Method Details
-
of
Create a new multi-polygon.- Parameters:
key
- identifying keypolygon
- polygon to add- Returns:
- a new multi-polygon
-
of
Create a new multi-polygon.- Parameters:
key
- identifying keypolygons
- polygons to add- Returns:
- a new multi-polygon
-
of
Create a new multi-polygon.- Parameters:
key
- identifying keypolygons
- polygons to add- Returns:
- a new multi-polygon
-
getPolygons
Get the list of polygons in this multi-polygon.- Returns:
- list of polygons
-
clearPolygons
Clear the list of polygons in this multi-polygon.- Returns:
- this multi-polygon
-
addPolygon
Add a polygon to this multi-polygon.- Parameters:
polygon
- polygon to add- Returns:
- this multi-polygon
-
addPolygon
Add polygons to this multi-polygon.- Parameters:
polygons
- polygons to add- Returns:
- this multi-polygon
-
addPolygon
Add polygons to this multi-polygon.- Parameters:
polygons
- polygons to add- Returns:
- this multi-polygon
-
removePoly
Remove a polygon from this multi-polygon.- Parameters:
polygon
- polygon to remove- Returns:
- this multi-polygon
-
removePoly
Remove polygons from this multi-polygon.- Parameters:
polygons
- polygons to remove- Returns:
- this multi-polygon
-
removePoly
Remove polygons from this multi-polygon.- Parameters:
polygons
- polygons to remove- Returns:
- this multi-polygon
-
toJson
public com.google.gson.JsonObject toJson()Description copied from interface:JsonSerializable
Jsonify this object.- Returns:
- object as json element
-
fromJson
-
equals
-
hashCode
public int hashCode() -
toString
-