Class MultiPolyline

java.lang.Object
net.pl3x.map.core.Keyed
net.pl3x.map.core.markers.marker.Marker<@NotNull MultiPolyline>
net.pl3x.map.core.markers.marker.MultiPolyline
All Implemented Interfaces:
JsonSerializable

public class MultiPolyline extends Marker<@NotNull MultiPolyline>
Represents a multi-polyline marker.
  • Constructor Details

    • MultiPolyline

      public MultiPolyline(@NotNull @NotNull String key, @NotNull @NotNull Polyline polyline)
      Create a new multi-polyline.
      Parameters:
      key - identifying key
      polyline - polyline to add
    • MultiPolyline

      public MultiPolyline(@NotNull @NotNull String key, @NotNull @NotNull Polyline @NotNull ... polylines)
      Create a new multi-polyline.
      Parameters:
      key - identifying key
      polylines - polylines to add
    • MultiPolyline

      public MultiPolyline(@NotNull @NotNull String key, @NotNull @NotNull Collection<@NotNull Polyline> polylines)
      Create a new multi-polyline.
      Parameters:
      key - identifying key
      polylines - polylines to add
  • Method Details

    • of

      @NotNull public static @NotNull MultiPolyline of(@NotNull @NotNull String key, @NotNull @NotNull Polyline polyline)
      Create a new multi-polyline.
      Parameters:
      key - identifying key
      polyline - polyline to add
      Returns:
      a new multi-polyline
    • of

      @NotNull public static @NotNull MultiPolyline of(@NotNull @NotNull String key, @NotNull @NotNull Polyline @NotNull ... polylines)
      Create a new multi-polyline.
      Parameters:
      key - identifying key
      polylines - polylines to add
      Returns:
      a new multi-polyline
    • of

      @NotNull public static @NotNull MultiPolyline of(@NotNull @NotNull String key, @NotNull @NotNull Collection<@NotNull Polyline> polylines)
      Create a new multi-polyline.
      Parameters:
      key - identifying key
      polylines - polylines to add
      Returns:
      a new multi-polyline
    • getPolylines

      @NotNull public @NotNull List<@NotNull Polyline> getPolylines()
      Get the list of polylines in this multi-polyline.
      Returns:
      list of polylines
    • clearPolylines

      @NotNull public @NotNull MultiPolyline clearPolylines()
      Clear the list of polylines in this multi-polyline.
      Returns:
      this multi-polyline
    • addPolyline

      @NotNull public @NotNull MultiPolyline addPolyline(@NotNull @NotNull Polyline polyline)
      Add a polyline to this multi-polyline.
      Parameters:
      polyline - polyline to add
      Returns:
      this multi-polyline
    • addPolyline

      @NotNull public @NotNull MultiPolyline addPolyline(@NotNull @NotNull Polyline @NotNull ... polylines)
      Add polylines to this multi-polyline.
      Parameters:
      polylines - polylines to add
      Returns:
      this multi-polyline
    • addPolyline

      @NotNull public @NotNull MultiPolyline addPolyline(@NotNull @NotNull Collection<@NotNull Polyline> polylines)
      Add polylines to this multi-polyline.
      Parameters:
      polylines - polylines to add
      Returns:
      this multi-polyline
    • removePolyline

      @NotNull public @NotNull MultiPolyline removePolyline(@NotNull @NotNull Polyline polyline)
      Remove a polyline from this multi-polyline.
      Parameters:
      polyline - polyline to remove
      Returns:
      this multi-polyline
    • removePolyline

      @NotNull public @NotNull MultiPolyline removePolyline(@NotNull @NotNull Polyline @NotNull ... polylines)
      Remove polylines from this multi-polyline.
      Parameters:
      polylines - polylines to remove
      Returns:
      this multi-polyline
    • removePolyline

      @NotNull public @NotNull MultiPolyline removePolyline(@NotNull @NotNull Collection<@NotNull Polyline> polylines)
      Remove polylines from this multi-polyline.
      Parameters:
      polylines - polylines to remove
      Returns:
      this multi-polyline
    • 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 MultiPolyline 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