Package net.pl3x.map.core.markers.marker
Class Circle
- All Implemented Interfaces:
JsonSerializable
Represents a circle marker.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanstatic @NotNull CirclefromJson(@NotNull com.google.gson.JsonObject obj) @NotNull PointGet the centerPointof this circle.doubleGet the radius of this circle.inthashCode()static @NotNull CircleCreate a new circle.static @NotNull CircleCreate a new circle.@NotNull CircleSet a new centerPointfor this circle.@NotNull CirclesetRadius(double radius) Set the radius for this circle.@NotNull com.google.gson.JsonObjecttoJson()Jsonify this object.@NotNull StringtoString()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 centerPointof this circle.- Returns:
- center point
-
setCenter
Set a new centerPointfor 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:JsonSerializableJsonify this object.- Returns:
- object as json element
-
fromJson
-
equals
-
hashCode
public int hashCode() -
toString
-