类 StepIntersection.Builder

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

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

    • Builder

      public Builder()
  • 方法详细资料

    • bearings

      public abstract StepIntersection.Builder bearings(@Nullable List<Integer> bearing)
      An integer array of bearing values available at the step intersection.
      参数:
      bearing - An array of bearing values (for example [0,90,180,270]) that are available at the intersection. The bearings describe all available roads at the intersection.
      返回:
      this builder for chaining options together
    • classes

      public abstract StepIntersection.Builder classes(@Nullable List<String> classes)
      A list of strings signifying the classes of the road exiting the intersection. Possible values:
      • toll: the road continues on a toll road
      • ferry: the road continues on a ferry
      • restricted: the road continues on with access restrictions
      • motorway: the road continues on a motorway
      参数:
      classes - a list of strings containing the classes of the road exiting the intersection
      返回:
      this builder for chaining options together
    • entry

      public abstract StepIntersection.Builder entry(@Nullable List<Boolean> entry)
      A list of entry flags, corresponding in a 1:1 relationship to the bearings. A value of true indicates that the respective road could be entered on a valid route. false indicates that the turn onto the respective road would violate a restriction.
      参数:
      entry - a Boolean list of entry flags, corresponding in a 1:1 relationship to the bearings
      返回:
      this builder for chaining options together
    • in

      public abstract StepIntersection.Builder in(@Nullable Integer in)
      Index into bearings/entry array. Used to calculate the bearing before the turn. Namely, the clockwise angle from true north to the direction of travel before the maneuver/passing the intersection. To get the bearing in the direction of driving, the bearing has to be rotated by a value of 180. The value is not supplied for departure maneuvers.
      参数:
      in - index into bearings/entry array
      返回:
      this builder for chaining options together
    • out

      public abstract StepIntersection.Builder out(@Nullable Integer out)
      Index out of the bearings/entry array. Used to extract the bearing after the turn. Namely, The clockwise angle from true north to the direction of travel after the maneuver/passing the intersection. The value is not supplied for arrive maneuvers.
      参数:
      out - index out of the bearings/entry array
      返回:
      this builder for chaining options together
    • lanes

      public abstract StepIntersection.Builder lanes(@Nullable List<IntersectionLanes> lanes)
      Array of lane objects that represent the available turn lanes at the intersection. If no lane information is available for an intersection, the lanes property will not be present. Lanes are provided in their order on the street, from left to right.
      参数:
      lanes - array of lane objects that represent the available turn lanes at the intersection
      返回:
      this builder for chaining options together
    • geometryIndex

      public abstract StepIntersection.Builder geometryIndex(@Nullable Integer geometryIndex)
      The zero-based index for the intersection. This value can be used to apply the duration annotation that corresponds with the intersection. Only available on the driving profile.
      参数:
      geometryIndex - index for the intersection
      返回:
      this builder for chaining options together
    • isUrban

      @Nullable public abstract StepIntersection.Builder isUrban(@Nullable Boolean isUrban)
      A boolean indicating whether the road exiting the intersection is considered to be in an urban area. This value is determined by the density of the surrounding road network. Only available on the DirectionsCriteria.PROFILE_DRIVING profile.
      参数:
      isUrban - indicating whether the road exiting the intersection is in an urban area
      返回:
      this builder for chaining options together
    • adminIndex

      @Nullable public abstract StepIntersection.Builder adminIndex(@Nullable Integer adminIndex)
      The zero-based index into the admin list on the route leg for this intersection. Use this field to look up the ISO-3166-1 country code for this point on the route. Only available on the `driving` profile.
      参数:
      adminIndex - zero-based index into the admin list on the route leg for this intersection
      返回:
      this builder for chaining options together
    • restStop

      @Nullable public abstract StepIntersection.Builder restStop(@Nullable RestStop restStop)
      An object containing information about passing rest stops along the route. Only available on the `driving` profile.
      参数:
      restStop - object containing information about passing rest stops along the route.
      返回:
      this builder for chaining options together
    • tollCollection

      @Nullable public abstract StepIntersection.Builder tollCollection(@Nullable TollCollection tollCollection)
      An object containing information about a toll collection point along the route. This is a payment booth or overhead electronic gantry payment booth or overhead electronic gantry where toll charge is collected.
      参数:
      tollCollection - object containing information about a toll collection point along the route.
      返回:
      this builder for chaining options together
    • tunnelName

      public abstract StepIntersection.Builder tunnelName(@Nullable String tunnelName)
      Name of the tunnel. Value is present only if class is tunnel.
      参数:
      tunnelName - name of the tunnel
      返回:
      this builder for chaining options together
    • rawLocation

      public abstract StepIntersection.Builder rawLocation(@NonNull double[] rawLocation)
      The rawLocation as a double array. Once the StepIntersection object's created, this raw location gets converted into a Point object and is public exposed as such. The double array should have a length of two, index 0 being the longitude and index 1 being latitude.
      参数:
      rawLocation - a double array with a length of two, index 0 being the longitude and index 1 being latitude.
      返回:
      this builder for chaining options together
    • build

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