类 MaxSpeed
java.lang.Object
ai.nextbillion.kits.directions.models.DirectionsJsonObject
ai.nextbillion.kits.directions.models.MaxSpeed
- 所有已实现的接口:
Serializable
Object representing max speeds along a route.
- 另请参阅:
-
嵌套类概要
嵌套类 -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明static MaxSpeed.Builderbuilder()Create a new instance of this class by using theMaxSpeed.Builderclass.static MaxSpeedCreate a new instance of this class by passing in a formatted valid JSON String.abstract Booleannone()Boolean is `true` if the speed limit is unlimited, otherwise null.abstract Integerspeed()Number indicating the posted speed limit.abstract MaxSpeed.BuilderConvert the currentMaxSpeedto 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 Stringunit()String indicating the unit of speed, either as `km/h` or `mph`.abstract Booleanunknown()Boolean is true if the speed limit is not known, otherwise null.从类继承的方法 ai.nextbillion.kits.directions.models.DirectionsJsonObject
toJson
-
构造器详细资料
-
MaxSpeed
public MaxSpeed()
-
-
方法详细资料
-
builder
Create a new instance of this class by using theMaxSpeed.Builderclass.- 返回:
MaxSpeed.Builderfor creating a new instance
-
speed
Number indicating the posted speed limit.- 返回:
- number indicating the posted speed limit
-
unit
String indicating the unit of speed, either as `km/h` or `mph`.- 返回:
- String unit either as `km/h` or `mph`
-
unknown
Boolean is true if the speed limit is not known, otherwise null.- 返回:
- Boolean true if speed limit is not known, otherwise null
-
none
Boolean is `true` if the speed limit is unlimited, otherwise null.- 返回:
- Boolean true if speed limit is unlimited, otherwise null
-
toBuilder
Convert the currentMaxSpeedto 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 modifiedMaxSpeed.- 返回:
- a
MaxSpeed.Builderwith the same values set to match the ones defined in thisMaxSpeed
-
typeAdapter
Gson type adapter for parsing Gson to this class.- 参数:
gson- the builtGsonobject- 返回:
- the type adapter for this class
-
fromJson
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
-