类 Incident
java.lang.Object
ai.nextbillion.kits.directions.models.DirectionsJsonObject
ai.nextbillion.kits.directions.models.Incident
- 所有已实现的接口:
Serializable
Reproduces one of road incidents type (
Incident.IncidentType) that might be on the way.- 另请参阅:
-
嵌套类概要
嵌套类修饰符和类型类说明static classThis builder can be used to set the values describing theIncident.static @interfaceImpact type.static @interfaceIncident type. -
字段概要
字段修饰符和类型字段说明static final StringIncident.ImpactTypecritical.static final StringIncident.ImpactTypelow.static final StringIncident.ImpactTypemajor.static final StringIncident.ImpactTypeminor.static final StringIncident.ImpactTypeunknown.static final StringIncident.IncidentTypeaccident.static final StringIncident.IncidentTypecongestion.static final StringIncident.IncidentTypeconstruction.static final StringIncident.IncidentTypedisabled vehicle. ?static final StringIncident.IncidentTypelane restriction.static final StringIncident.IncidentTypemass transit.static final StringIncident.IncidentTypemiscellaneous.static final StringIncident.IncidentTypeother news.static final StringIncident.IncidentTypeplanned event.static final StringIncident.IncidentTyperoad closure.static final StringIncident.IncidentTyperoad hazard.static final StringIncident.IncidentTypeweather. -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明AlertC codes.static Incident.Builderbuilder()Create a new instance of this class by using theIncident.Builderclass.abstract Booleanclosed()True if road is closed and no possibility to pass through there.abstract CongestionQuantitative descriptor of congestion.abstract StringTime the incident was created/updated in ISO8601 format.abstract StringHuman-readable description of the incident suitable for displaying to the users.abstract StringendTime()End time of the incident in ISO8601 format.static IncidentCreate a new instance of this class by passing in a formatted valid JSON String.abstract IntegerIncident's geometry index end point.abstract IntegerIncident's geometry index start point.abstract Stringid()Unique identifier for incident.abstract Stringimpact()Severity level of incident.abstract StringHuman-readable long description of the incident suitable for displaying to the users.abstract StringStart time of the incident in ISO8601 format.abstract StringsubType()Sub-type of the incident.abstract StringSub-type-specific description.abstract Incident.BuilderConvert the currentIncidentto its builder holding the currently assigned values.abstract Stringtype()One of incident types.static com.google.gson.TypeAdapter<Incident>typeAdapter(com.google.gson.Gson gson) Gson type adapter for parsing Gson to this class.从类继承的方法 ai.nextbillion.kits.directions.models.DirectionsJsonObject
toJson
-
字段详细资料
-
INCIDENT_ACCIDENT
Incident.IncidentTypeaccident.- 另请参阅:
-
INCIDENT_CONGESTION
Incident.IncidentTypecongestion.- 另请参阅:
-
INCIDENT_CONSTRUCTION
Incident.IncidentTypeconstruction.- 另请参阅:
-
INCIDENT_DISABLED_VEHICLE
Incident.IncidentTypedisabled vehicle. ?- 另请参阅:
-
INCIDENT_LANE_RESTRICTION
Incident.IncidentTypelane restriction.- 另请参阅:
-
INCIDENT_MASS_TRANSIT
Incident.IncidentTypemass transit.- 另请参阅:
-
INCIDENT_MISCELLANEOUS
Incident.IncidentTypemiscellaneous.- 另请参阅:
-
INCIDENT_OTHER_NEWS
Incident.IncidentTypeother news.- 另请参阅:
-
INCIDENT_PLANNED_EVENT
Incident.IncidentTypeplanned event.- 另请参阅:
-
INCIDENT_ROAD_CLOSURE
Incident.IncidentTyperoad closure.- 另请参阅:
-
INCIDENT_ROAD_HAZARD
Incident.IncidentTyperoad hazard.- 另请参阅:
-
INCIDENT_WEATHER
Incident.IncidentTypeweather.- 另请参阅:
-
IMPACT_UNKNOWN
Incident.ImpactTypeunknown.- 另请参阅:
-
IMPACT_CRITICAL
Incident.ImpactTypecritical.- 另请参阅:
-
IMPACT_MAJOR
Incident.ImpactTypemajor.- 另请参阅:
-
IMPACT_MINOR
Incident.ImpactTypeminor.- 另请参阅:
-
IMPACT_LOW
Incident.ImpactTypelow.- 另请参阅:
-
-
构造器详细资料
-
Incident
public Incident()
-
-
方法详细资料
-
id
Unique identifier for incident. It might be the only one non-null filed which meant that incident started on previous leg and one has an incident with the same id. -
type
One of incident types.- 另请参阅:
-
closed
True if road is closed and no possibility to pass through there. False otherwise. -
congestion
Quantitative descriptor of congestion. -
description
Human-readable description of the incident suitable for displaying to the users. -
longDescription
Human-readable long description of the incident suitable for displaying to the users. -
impact
Severity level of incident.- 另请参阅:
-
subType
Sub-type of the incident. -
subTypeDescription
Sub-type-specific description. -
alertcCodes
AlertC codes.- 另请参阅:
-
geometryIndexStart
Incident's geometry index start point. -
geometryIndexEnd
Incident's geometry index end point. -
creationTime
Time the incident was created/updated in ISO8601 format. Not the samestartTime()/endTime(), incident can be created/updated before the incident. -
startTime
Start time of the incident in ISO8601 format. -
endTime
End time of the incident in ISO8601 format. -
builder
Create a new instance of this class by using theIncident.Builderclass.- 返回:
- this classes
Incident.Builderfor creating a new instance
-
toBuilder
Convert the currentIncidentto 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 modifiedIncident.- 返回:
- a
Incident.Builderwith the same values set to match the ones defined in thisIncident
-
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 an Incident- 返回:
- a new instance of this class defined by the values passed in the method
-