public abstract class MaxSpeed extends DirectionsJsonObject
Modifier and Type | Class and Description |
---|---|
static class |
MaxSpeed.Builder
This builder can be used to set the values describing the
MaxSpeed . |
Constructor and Description |
---|
MaxSpeed() |
Modifier and Type | Method and Description |
---|---|
static MaxSpeed.Builder |
builder()
Create a new instance of this class by using the
MaxSpeed.Builder class. |
static MaxSpeed |
fromJson(java.lang.String json)
Create a new instance of this class by passing in a formatted valid JSON String.
|
abstract java.lang.Boolean |
none()
Boolean is `true` if the speed limit is unlimited, otherwise null.
|
abstract java.lang.Integer |
speed()
Number indicating the posted speed limit.
|
abstract MaxSpeed.Builder |
toBuilder()
Convert the current
MaxSpeed to its builder holding the currently assigned
values. |
static com.google.gson.TypeAdapter<MaxSpeed> |
typeAdapter(com.google.gson.Gson gson)
Gson type adapter for parsing Gson to this class.
|
abstract java.lang.String |
unit()
String indicating the unit of speed, either as `km/h` or `mph`.
|
abstract java.lang.Boolean |
unknown()
Boolean is true if the speed limit is not known, otherwise null.
|
getUnrecognizedJsonProperties, getUnrecognizedPropertiesNames, getUnrecognizedProperty, toJson
public static MaxSpeed.Builder builder()
MaxSpeed.Builder
class.MaxSpeed.Builder
for creating a new instance@Nullable public abstract java.lang.Integer speed()
@Nullable public abstract java.lang.String unit()
@Nullable public abstract java.lang.Boolean unknown()
@Nullable public abstract java.lang.Boolean none()
public abstract MaxSpeed.Builder toBuilder()
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
.MaxSpeed.Builder
with the same values set to match the ones defined
in this MaxSpeed
public static com.google.gson.TypeAdapter<MaxSpeed> typeAdapter(com.google.gson.Gson gson)
gson
- the built Gson
objectpublic static MaxSpeed fromJson(java.lang.String json)
json
- a formatted valid JSON string defining a MaxSpeed