Class Circle

All Implemented Interfaces:
JsonSerializable

public class Circle extends Marker<@NotNull Circle>
Represents a circle marker.
  • Constructor Details

    • Circle

      public Circle(@NotNull @NotNull String key, double centerX, double centerZ, double radius)
      Create a new circle.
      Parameters:
      key - identifying key
      centerX - center x location
      centerZ - center z location
      radius - circle radius
    • Circle

      public Circle(@NotNull @NotNull String key, @NotNull @NotNull Point center, double radius)
      Create a new circle.
      Parameters:
      key - identifying key
      center - center location
      radius - 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 key
      centerX - center x location
      centerZ - center z location
      radius - 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 key
      center - center location
      radius - circle radius
      Returns:
      a new circle
    • getCenter

      @NotNull public @NotNull Point getCenter()
      Get the center Point of this circle.
      Returns:
      center point
    • setCenter

      @NotNull public @NotNull Circle setCenter(@NotNull @NotNull Point center)
      Set a new center Point for this circle.
      Parameters:
      center - new center
      Returns:
      this circle
    • getRadius

      public double getRadius()
      Get the radius of this circle.
      Returns:
      radius
    • setRadius

      @NotNull public @NotNull Circle setRadius(double radius)
      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

      @NotNull public static @NotNull Circle fromJson(@NotNull @NotNull com.google.gson.JsonObject obj)
    • equals

      public boolean equals(@Nullable @Nullable Object o)
      Overrides:
      equals in class Keyed
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Keyed
    • toString

      @NotNull public @NotNull String toString()
      Overrides:
      toString in class Keyed