Class Circle

All Implemented Interfaces:
JsonSerializable

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

    • Circle

      public Circle(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(String key, Point center, double radius)
      Create a new circle.
      Parameters:
      key - identifying key
      center - center location
      radius - circle radius
  • Method Details

    • of

      public static Circle of(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

      public static Circle of(String key, Point center, double radius)
      Create a new circle.
      Parameters:
      key - identifying key
      center - center location
      radius - circle radius
      Returns:
      a new circle
    • getCenter

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

      public Circle setCenter(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

      public Circle setRadius(double radius)
      Set the radius for this circle.
      Parameters:
      radius - new radius
      Returns:
      this circle
    • toJson

      public com.google.gson.JsonObject toJson()
      Description copied from interface: JsonSerializable
      Jsonify this object.
      Returns:
      object as json element
    • fromJson

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

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

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

      public String toString()
      Overrides:
      toString in class Keyed