Class Options

java.lang.Object
net.pl3x.map.core.markers.option.Options
All Implemented Interfaces:
JsonSerializable

public class Options extends Object implements JsonSerializable
Represents a Marker's options.
  • Constructor Details

    • Options

      public Options()
      Create empty marker options.
    • Options

      public Options(@Nullable @Nullable Stroke stroke, @Nullable @Nullable Fill fill, @Nullable @Nullable Tooltip tooltip, @Nullable @Nullable Popup popup)
      Create marker options.
      Parameters:
      stroke - stroke rules
      fill - fill rules
      tooltip - tooltip rules
  • Method Details

    • builder

      @NotNull public static @NotNull Options.Builder builder()
      Create a new Options.Builder.
    • getStroke

      @Nullable public @Nullable Stroke getStroke()
      Get stroke rules.
      Returns:
      stroke rules
    • setStroke

      @NotNull public @NotNull Options setStroke(@Nullable @Nullable Stroke stroke)
      Set new stroke rules.
      Parameters:
      stroke - new stroke rules.
      Returns:
      this marker options
    • getFill

      @Nullable public @Nullable Fill getFill()
      Get fill rules.
      Returns:
      fill rules
    • setFill

      @NotNull public @NotNull Options setFill(@Nullable @Nullable Fill fill)
      Set new fill rules.
      Parameters:
      fill - new fill rules
      Returns:
      this marker options
    • getTooltip

      @Nullable public @Nullable Tooltip getTooltip()
      Get tooltip rules.
      Returns:
      tooltip rules
    • setTooltip

      @NotNull public @NotNull Options setTooltip(@Nullable @Nullable Tooltip tooltip)
      Set new tooltip rules.
      Parameters:
      tooltip - new tooltip rules
      Returns:
      this marker options
    • getPopup

      @Nullable public @Nullable Popup getPopup()
      Get popup rules.
      Returns:
      popup rules
    • setPopup

      @NotNull public @NotNull Options setPopup(@Nullable @Nullable Popup popup)
      Set new popup rules.
      Parameters:
      popup - new popup rules
      Returns:
      this marker options
    • asBuilder

      @NotNull public @NotNull Options.Builder asBuilder()
      Create a new Options.Builder from this Options instance
      Returns:
      new builder
    • toJson

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

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

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

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

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