类 BannerText

java.lang.Object
ai.nextbillion.kits.directions.models.DirectionsJsonObject
ai.nextbillion.kits.directions.models.BannerText
所有已实现的接口:
Serializable

public abstract class BannerText extends DirectionsJsonObject
Includes both plain text information that can be visualized inside your navigation application along with the text string broken down into BannerComponents which may or may not include a image url. To receive this information, your request must have NbmapDirections.Builder#bannerInstructions() set to true.
另请参阅:
  • 构造器详细资料

    • BannerText

      public BannerText()
  • 方法详细资料

    • builder

      public static BannerText.Builder builder()
      Create a new instance of this class by using the BannerText.Builder class.
      返回:
      this classes BannerText.Builder for creating a new instance
    • text

      @NonNull public abstract String text()
      Plain text with all the BannerComponents text combined.
      返回:
      plain text with all the BannerComponents text items combined
    • instruction

      @Nullable public abstract String instruction()
      返回:
      a short instruction text
    • components

      @Nullable public abstract List<BannerComponents> components()
      A part or element of the BannerInstructions.
      返回:
      a BannerComponents specific to a LegStep
    • type

      @Nullable public abstract String type()
      This indicates the type of maneuver.
      返回:
      String with type of maneuver
      另请参阅:
    • modifier

      @Nullable public abstract String modifier()
      This indicates the mode of the maneuver. If type is of turn, the modifier indicates the change in direction accomplished through the turn. If the type is of depart/arrive, the modifier indicates the position of waypoint from the current direction of travel.
      返回:
      String with modifier
    • degrees

      @Nullable public abstract Double degrees()
      The degrees at which you will be exiting a roundabout, assuming `180` indicates going straight through the roundabout.
      返回:
      at which you will be exiting a roundabout
    • drivingSide

      @Nullable @SerializedName("driving_side") public abstract String drivingSide()
      A string representing which side the of the street people drive on in that location. Can be 'left' or 'right'.
      返回:
      String either `left` or `right`
    • toBuilder

      public abstract BannerText.Builder toBuilder()
      Convert the current BannerText to its builder holding the currently assigned values. This allows you to modify a single property and then rebuild the object resulting in an updated and modified BannerText.
      返回:
      a BannerText.Builder with the same values set to match the ones defined in this BannerText
    • typeAdapter

      public static com.google.gson.TypeAdapter<BannerText> typeAdapter(com.google.gson.Gson gson)
      Gson type adapter for parsing Gson to this class.
      参数:
      gson - the built Gson object
      返回:
      the type adapter for this class
    • fromJson

      public static BannerText fromJson(String json)
      Create a new instance of this class by passing in a formatted valid JSON String.
      参数:
      json - a formatted valid JSON string defining a BannerText
      返回:
      a new instance of this class defined by the values passed inside this static factory method