类 MaxSpeed

所有已实现的接口:
Serializable

public abstract class MaxSpeed extends DirectionsJsonObject
Object representing max speeds along a route.
另请参阅:
  • 构造器详细资料

    • MaxSpeed

      public MaxSpeed()
  • 方法详细资料

    • builder

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

      @Nullable public abstract Integer speed()
      Number indicating the posted speed limit.
      返回:
      number indicating the posted speed limit
    • unit

      @Nullable public abstract String unit()
      String indicating the unit of speed, either as `km/h` or `mph`.
      返回:
      String unit either as `km/h` or `mph`
    • unknown

      @Nullable public abstract Boolean unknown()
      Boolean is true if the speed limit is not known, otherwise null.
      返回:
      Boolean true if speed limit is not known, otherwise null
    • none

      @Nullable public abstract Boolean none()
      Boolean is `true` if the speed limit is unlimited, otherwise null.
      返回:
      Boolean true if speed limit is unlimited, otherwise null
    • toBuilder

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

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