Package net.pl3x.map.core.markers.marker
Class Circle
- All Implemented Interfaces:
JsonSerializable
Represents a circle marker.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
static @NotNull Circle
fromJson
(@NotNull com.google.gson.JsonObject obj) @NotNull Point
Get the centerPoint
of this circle.double
Get the radius of this circle.int
hashCode()
static @NotNull Circle
Create a new circle.static @NotNull Circle
Create a new circle.@NotNull Circle
Set a new centerPoint
for this circle.@NotNull Circle
setRadius
(double radius) Set the radius for this circle.@NotNull com.google.gson.JsonObject
toJson()
Jsonify this object.@NotNull String
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
-
Circle
Create a new circle.- Parameters:
key
- identifying keycenterX
- center x locationcenterZ
- center z locationradius
- circle radius
-
Circle
Create a new circle.- Parameters:
key
- identifying keycenter
- center locationradius
- circle radius
-
-
Method Details
-
of
@NotNull public static @NotNull Circle of(@NotNull @NotNull String key, double centerX, double centerZ, double radius) Create a new circle.- Parameters:
key
- identifying keycenterX
- center x locationcenterZ
- center z locationradius
- circle radius- Returns:
- a new circle
-
of
@NotNull public static @NotNull Circle of(@NotNull @NotNull String key, @NotNull @NotNull Point center, double radius) Create a new circle.- Parameters:
key
- identifying keycenter
- center locationradius
- circle radius- Returns:
- a new circle
-
getCenter
Get the centerPoint
of this circle.- Returns:
- center point
-
setCenter
Set a new centerPoint
for this circle.- Parameters:
center
- new center- Returns:
- this circle
-
getRadius
public double getRadius()Get the radius of this circle.- Returns:
- radius
-
setRadius
Set the radius for this circle.- Parameters:
radius
- new radius- Returns:
- this circle
-
toJson
@NotNull public @NotNull 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
-