TruckRestrictionWarning (API Reference)
Class TruckRestrictionWarning
Represents truck restrictions. For example, there can be a bridge ahead not high enough to pass a big truck or there can be a road ahead where the truck’s weight exceeds the permissible limit.
-
Field Summary
FieldsModifier and TypeFieldDescriptionThe axle count for which the current restriction applies.Vehicle dimension restrictions.doubleThe distance from the current location to the restriction.Indicates if the specified truck restriction is ahead of the vehicle or has just passed by.The list of hazardous materials which are restricted on the road section for which the warning applies.Time rule indicating the time periods for which the restriction applies.The trailer count for which the current restriction applies.Truck road type restriction.Tunnel category.Weight restriction. -
Constructor Summary
ConstructorsConstructorDescriptionTruckRestrictionWarning(double distanceInMeters, DistanceType distanceType) Creates a new instance. -
Method Summary
-
Field Details
-
distanceInMeters
public double distanceInMetersThe distance from the current location to the restriction.
-
weightRestriction
Weight restriction. It is
nullwhen there is no known weight restriction ahead. -
dimensionRestriction
Vehicle dimension restrictions. It is
nullwhen there is no known dimension restriction ahead. -
distanceType
Indicates if the specified truck restriction is ahead of the vehicle or has just passed by. If it is ahead, then
distanceInMetersis greater than 0. -
trailerCount
The trailer count for which the current restriction applies. If the field is 'null' then the current restriction does not have a condition based on trailers count.
-
timeRule
Time rule indicating the time periods for which the restriction applies. If the field is 'null' then the restriction is applicable at anytime.
-
truckRoadType
Truck road type restriction.
-
hazardousMaterials
The list of hazardous materials which are restricted on the road section for which the warning applies.
-
tunnelCategory
Tunnel category.
-
axleCount
The axle count for which the current restriction applies. If this field is
null, the restriction does not depend on axle count.
-
-
Constructor Details
-
Method Details
-
equals
-
hashCode
public int hashCode() -
isGeneral
public boolean isGeneral()Checks if this truck restriction warning is general. A general warning has no specific restriction conditions set. Please note that time rule still might be set for a general warning, but it is not considered as a specific restriction condition. This method only checks that no specific conditions are set for the warning.
- Returns:
trueif all restriction fields are null or empty,falseotherwise.
-