类 TollCollection

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

public abstract class TollCollection extends DirectionsJsonObject
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. Only available on the DirectionsCriteria.PROFILE_DRIVING profile.
另请参阅:
  • 构造器详细资料

    • TollCollection

      public TollCollection()
  • 方法详细资料

    • type

      @Nullable public abstract String type()
      The type of toll collection point, either `toll_booth` or `toll_gantry`. Note that adding new possible types is not considered a breaking change.
    • builder

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

      public abstract TollCollection.Builder toBuilder()
      Convert the current TollCollection 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 TollCollection.
      返回:
      a TollCollection.Builder with the same values set to match the ones defined in this TollCollection
    • typeAdapter

      public static com.google.gson.TypeAdapter<TollCollection> 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 TollCollection 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 an Incident
      返回:
      a new instance of this class defined by the values passed in the method