类 RouteLeg.Builder

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

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

    • Builder

      public Builder()
  • 方法详细资料

    • distance

      public abstract RouteLeg.Builder distance(@Nullable Double distance)
      The distance traveled from one waypoint to another.
      参数:
      distance - a double number with unit meters
      返回:
      this builder for chaining options together
    • duration

      public abstract RouteLeg.Builder duration(@Nullable Double duration)
      The estimated travel time from one waypoint to another.
      参数:
      duration - a double number with unit seconds
      返回:
      this builder for chaining options together
    • durationTypical

      public abstract RouteLeg.Builder durationTypical(@Nullable Double durationTypical)
      The typical travel time for traversing this RouteLeg. There's a delay along the RouteLeg if you subtract this durationTypical() value from the RouteLeg 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
    • summary

      public abstract RouteLeg.Builder summary(@Nullable String summary)
      A short human-readable summary of major roads traversed. Useful to distinguish alternatives.
      参数:
      summary - String with summary
      返回:
      this builder for chaining options together
    • admins

      public abstract RouteLeg.Builder admins(@Nullable List<Admin> admins)
      An array of objects describing the administrative boundaries the route leg travels through. Use StepIntersection.adminIndex() on the intersection object to look up the admin for each intersection in this array.
      参数:
      admins - Array with admins
      返回:
      this builder for chaining options together
    • steps

      public abstract RouteLeg.Builder steps(@Nullable List<LegStep> steps)
      Gives a List including all the steps to get from one waypoint to another.
      参数:
      steps - List of LegStep
      返回:
      this builder for chaining options together
    • incidents

      public abstract RouteLeg.Builder incidents(@Nullable List<Incident> incidents)
      A list of incidents that occur on this leg.
      参数:
      incidents - a list of Incident
      返回:
      this builder for chaining options together
    • annotation

      public abstract RouteLeg.Builder annotation(@Nullable LegAnnotation annotation)
      A LegAnnotation that contains additional details about each line segment along the route geometry. If you'd like to receiving this, you must request it inside your Directions request before executing the call.
      参数:
      annotation - a LegAnnotation object
      返回:
      this builder for chaining options together
    • closures

      public abstract RouteLeg.Builder closures(@Nullable List<Closure> closures)
      A list of closures that occur on this leg.
      参数:
      closures - a list of Closure
      返回:
      this builder for chaining options together
    • build

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