VehicleRestriction (API Reference)
Class VehicleRestriction
Represents a vehicle restriction.
Any non null field adds more details to the restriction.
All fields with value null indicate a general
truck restriction.
Note: This is a beta release of this feature. Related APIs may change for new releases without a deprecation process.
-
Field Summary
FieldsModifier and TypeFieldDescriptionThe axle count for which the current restriction applies.Number of axles in a group for which the current restriction applies.Restriction on transport of hazardous materials and max allowed tunnel category.ASpecificRestrictiondefines what type of restriction applies (weight, height, etc.) and the range of allowed values.Restriction applies during specific time.Number of trailers for which the restriction applies.Restriction applies to a specific truck category.Type of weather in which restriction applies. -
Constructor Summary
ConstructorsConstructorDescriptionCreates an uncoditional general restriction.VehicleRestriction(SpecificRestriction restriction) Creates an unconditional restriction. -
Method Summary
-
Field Details
-
restriction
A
SpecificRestrictiondefines what type of restriction applies (weight, height, etc.) and the range of allowed values. -
hazmatRestriction
Restriction on transport of hazardous materials and max allowed tunnel category. For example, (FLAMMABLE, TunnelCategory.D) means, a restriction applying for trucks carrying flammable materials are not allowed to enter tunnels category D and E - (TunnelCategory.B and TunnelCategory.C allowed).
-
timeRestriction
Restriction applies during specific time.
-
weather
Type of weather in which restriction applies.
-
truckCategory
Restriction applies to a specific truck category.
-
trailerCount
Number of trailers for which the restriction applies.
-
axleCount
The axle count for which the current restriction applies. Can be used in conjunction with
RestrictionType.WEIGHT_PER_AXLE_COUNTto specify restriction based on weight per number of axles. TheaxleCountconsiders total number of axles on the whole vehicle (truck + trailers). This can be used to limit the weight per axle for the whole truck. IfaxleCountis null, the restriction is general and applies regardless of axle count. If the upper limit of theaxleCountrange is 0 ornullthen it means the restriction applies for values >= lower limit, i.e. the upper limit of range if infinite or unbound. When a user taps the icon, the allowedaxleCountrange can be retrieved directly fromVehicleRestriction.axleCount. Examples:- (2,2) → Restriction applies to vehicles with exactly 2 axles.
- (2,4) → Restriction applies to vehicles with 2, 3, or 4 axles.
- (2, 0) → Restriction applies to vehicles with 2 or more axles (equivalent to 2...∞)
-
axleCountInGroup
Number of axles in a group for which the current restriction applies.
axleCountInGroupis a set of axles close together: single, tandem (2), triple (3), etc. Can be used in conjunction withRestrictionType.WEIGHT_PER_AXLE_GROUPto specify restriction based on weight per axle group. TheaxleCountInGroupconsiders number of axles in a specific axle group (usually rear axles on the truck or trailer). This can be used to limit weight for a tandem/triple rear axle group. If the upper limit of theaxleCountInGrouprange is 0 ornullthen it means the restriction applies for values >= lower limit, i.e. the upper limit of range if infinite or unbound. Examples:- (1,1) → Restriction applies to single axle group.
- (2,2) → Restriction applies to tandem axle group.
- (2,4) → Restriction applies to any axle group from 2 to 4 axles.
- (2,0) → Restriction applies to axle groups with 2 or more axles.
-
-
Constructor Details
-
VehicleRestriction
Creates an unconditional restriction.
- Parameters:
restriction-A
SpecificRestrictiondefines what type of restriction applies (weight, height, etc.) and the range of allowed values.
-
VehicleRestriction
public VehicleRestriction()Creates an uncoditional general restriction.
-
-
Method Details