Class VehicleRestriction

java.lang.Object
com.here.sdk.transport.VehicleRestriction

public final class VehicleRestriction extends Object

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 Details

    • restriction

      @Nullable public SpecificRestriction restriction

      A SpecificRestriction defines what type of restriction applies (weight, height, etc.) and the range of allowed values.

    • hazmatRestriction

      @Nullable public HazardousMaterialRestriction 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

      @Nullable public TimeRestriction timeRestriction

      Restriction applies during specific time.

    • weather

      @Nullable public WeatherType weather

      Type of weather in which restriction applies.

    • truckCategory

      @Nullable public TruckCategory truckCategory

      Restriction applies to a specific truck category.

    • trailerCount

      @Nullable public IntegerRange trailerCount

      Number of trailers for which the restriction applies.

    • axleCount

      @Nullable public IntegerRange axleCount

      The axle count for which the current restriction applies. Can be used in conjunction with RestrictionType.WEIGHT_PER_AXLE_COUNT to specify restriction based on weight per number of axles. The axleCount considers total number of axles on the whole vehicle (truck + trailers). This can be used to limit the weight per axle for the whole truck. If axleCount is null, the restriction is general and applies regardless of axle count. If the upper limit of the axleCount range is 0 or null then 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 allowed axleCount range can be retrieved directly from VehicleRestriction.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

      @Nullable public IntegerRange axleCountInGroup

      Number of axles in a group for which the current restriction applies. axleCountInGroup is a set of axles close together: single, tandem (2), triple (3), etc. Can be used in conjunction with RestrictionType.WEIGHT_PER_AXLE_GROUP to specify restriction based on weight per axle group. The axleCountInGroup considers 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 the axleCountInGroup range is 0 or null then 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

      public VehicleRestriction(@Nullable SpecificRestriction restriction)

      Creates an unconditional restriction.

      Parameters:
      restriction -

      A SpecificRestriction defines what type of restriction applies (weight, height, etc.) and the range of allowed values.

    • VehicleRestriction

      public VehicleRestriction()

      Creates an uncoditional general restriction.

  • Method Details