类 LegStep.Builder

java.lang.Object
ai.nextbillion.kits.directions.models.LegStep.Builder
封闭类:
LegStep

public abstract static class LegStep.Builder extends Object
This builder can be used to set the values describing the LegStep.
  • 构造器详细资料

    • Builder

      public Builder()
  • 方法详细资料

    • distance

      public abstract LegStep.Builder distance(double distance)
      The distance traveled from the maneuver to the next LegStep.
      参数:
      distance - a double number with unit meters
      返回:
      this builder for chaining options together
    • duration

      public abstract LegStep.Builder duration(double duration)
      The estimated travel time from the maneuver to the next LegStep.
      参数:
      duration - a double number with unit seconds
      返回:
      this builder for chaining options together
    • durationTypical

      public abstract LegStep.Builder durationTypical(@Nullable Double durationTypical)
      The typical travel time for traversing this LegStep. There's a delay along the LegStep if you subtract this durationTypical() value from the LegStep duration() value and the resulting difference is greater than 0. The delay is because of any number of real-world situations (road repair, traffic jam, etc).
      参数:
      durationTypical - a double number with unit seconds
      返回:
      this builder for chaining options together
    • speedLimitUnit

      public abstract LegStep.Builder speedLimitUnit(@Nullable String speedLimitUnit)
      Speed limit unit as per the locale.
      参数:
      speedLimitUnit - speed limit unit
      返回:
      this builder for chaining options together
      另请参阅:
    • speedLimitSign

      public abstract LegStep.Builder speedLimitSign(@Nullable String speedLimitSign)
      Speed limit sign type.
      参数:
      speedLimitSign - speed limit sign
      返回:
      this builder for chaining options together
      另请参阅:
    • geometry

      public abstract LegStep.Builder geometry(@Nullable String geometry)
      Gives the geometry of the leg step.
      参数:
      geometry - an encoded polyline string
      返回:
      this builder for chaining options together
    • name

      public abstract LegStep.Builder name(@Nullable String name)
      String with the name of the way along which the travel proceeds.
      参数:
      name - a String representing the way along which the travel proceeds
      返回:
      this builder for chaining options together
    • ref

      public abstract LegStep.Builder ref(@Nullable String ref)
      String with reference number or code of the way along which the travel proceeds.
      参数:
      ref - String with reference number or code of the way along which the travel proceeds. Optionally included, if data is available
      返回:
      this builder for chaining options together
    • destinations

      public abstract LegStep.Builder destinations(@Nullable String destinations)
      String with the destinations of the way along which the travel proceeds.
      参数:
      destinations - String with the destinations of the way along which the travel proceeds. Optionally included, if data is available
      返回:
      this builder for chaining options together
    • mode

      public abstract LegStep.Builder mode(@NonNull String mode)
      Indicates the mode of transportation in the step.
      参数:
      mode - String indicating the mode of transportation
      返回:
      this builder for chaining options together
    • pronunciation

      public abstract LegStep.Builder pronunciation(@Nullable String pronunciation)
      The pronunciation hint of the way name. Will be undefined if no pronunciation is hit.
      参数:
      pronunciation - String with the pronunciation
      返回:
      this builder for chaining options together
    • rotaryName

      public abstract LegStep.Builder rotaryName(@Nullable String rotaryName)
      An optional string indicating the name of the rotary. This will only be a nonnull when the maneuver type equals rotary.
      参数:
      rotaryName - String with the rotary name
      返回:
      this builder for chaining options together
    • rotaryPronunciation

      public abstract LegStep.Builder rotaryPronunciation(@Nullable String rotaryPronunciation)
      An optional string indicating the pronunciation of the name of the rotary. This will only be a nonnull when the maneuver type equals rotary.
      参数:
      rotaryPronunciation - String in IPA with the rotary name's pronunciation.
      返回:
      this builder for chaining options together
    • maneuver

      public abstract LegStep.Builder maneuver(@NonNull StepManeuver maneuver)
      A StepManeuver object that typically represents the first coordinate making up the LegStep.geometry().
      参数:
      maneuver - new StepManeuver object
      返回:
      this builder for chaining options together
    • voiceInstructions

      public abstract LegStep.Builder voiceInstructions(@NonNull List<VoiceInstructions> voiceInstructions)
      The voice instructions object is useful for navigation sessions providing well spoken text instructions along with the distance from the maneuver the instructions should be said.
      参数:
      voiceInstructions - a list of voice instructions which can be triggered on this current step
      返回:
      this builder for chaining options together
    • bannerInstructions

      public abstract LegStep.Builder bannerInstructions(@NonNull List<BannerInstructions> bannerInstructions)
      If in your request you set NbmapDirections.Builder#bannerInstructions() to true, you'll receive a list of BannerInstructions which encompasses all information necessary for creating a visual cue about a given LegStep.
      参数:
      bannerInstructions - a list of BannerInstructionss which help display visual cues inside your application
      返回:
      this builder for chaining options together
    • drivingSide

      public abstract LegStep.Builder drivingSide(@Nullable String drivingSide)
      The legal driving side at the location for this step. Result will either be left or right.
      参数:
      drivingSide - a string with either a left or right value
      返回:
      this builder for chaining options together
    • weight

      public abstract LegStep.Builder weight(double weight)
      Specifies a decimal precision of edge weights, default value 1.
      参数:
      weight - a decimal precision double value
      返回:
      this builder for chaining options together
    • intersections

      public abstract LegStep.Builder intersections(@NonNull List<StepIntersection> intersections)
      Provide a list of all the intersections connected to the current way the user is traveling along.
      参数:
      intersections - list of StepIntersection representing all intersections along the step
      返回:
      this builder for chaining options together
    • exits

      public abstract LegStep.Builder exits(@Nullable String exits)
      String with the exit numbers or names of the way. Optionally included, if data is available.
      参数:
      exits - a String identifying the exit number or name
      返回:
      this builder for chaining options together
    • build

      public abstract LegStep build()
      Build a new LegStep object.
      返回:
      a new LegStep using the provided values in this builder