Class SnapToRoadSegment.Builder

java.lang.Object
com.cercalia.sdk.model.snaptoroad.SnapToRoadSegment.Builder
Enclosing class:
SnapToRoadSegment

public static final class SnapToRoadSegment.Builder extends Object
Builder for SnapToRoadSegment.
  • Method Details

    • wkt

      @NotNull public @NotNull SnapToRoadSegment.Builder wkt(@NotNull @NotNull String wkt)
      Sets the WKT geometry.
      Parameters:
      wkt - the WKT geometry
      Returns:
      this builder
    • distance

      @NotNull public @NotNull SnapToRoadSegment.Builder distance(double distance)
      Sets the distance in kilometers.
      Parameters:
      distance - the distance
      Returns:
      this builder
    • attribute

      @NotNull public @NotNull SnapToRoadSegment.Builder attribute(@Nullable @Nullable String attribute)
      Sets the grouping attribute.
      Parameters:
      attribute - the attribute
      Returns:
      this builder
    • speeding

      @NotNull public @NotNull SnapToRoadSegment.Builder speeding(@Nullable @Nullable Boolean speeding)
      Sets whether speeding was detected.
      Parameters:
      speeding - the speeding flag
      Returns:
      this builder
    • speedingLevel

      @NotNull public @NotNull SnapToRoadSegment.Builder speedingLevel(@Nullable @Nullable Integer speedingLevel)
      Sets the speeding level.
      Parameters:
      speedingLevel - the speeding level
      Returns:
      this builder
    • build

      @NotNull public @NotNull SnapToRoadSegment build()
      Builds the SnapToRoadSegment.
      Returns:
      a new SnapToRoadSegment
      Throws:
      IllegalStateException - if wkt is not set