sdk-routing / com.tomtom.online.sdk.routing.route.vehicle / VehicleRestrictions / Builder

Builder

@Beta(2020, 12) class Builder

Builder used to create an instance of VehicleRestrictions. Once constructed, the user cannot change the field values.

Constructors

<init>

Builder()

Builder used to create an instance of VehicleRestrictions. Once constructed, the user cannot change the field values.

Functions

build

fun build(): VehicleRestrictions

Creates a new instance of the VehicleRestrictions.

isVehicleCommercial

fun isVehicleCommercial(isVehicleCommercial: Boolean): VehicleRestrictions.Builder

Specifies whether the vehicle is used for commercial purposes and thus may not be allowed to drive on some roads.

vehicleAdrTunnelRestrictionCode

fun vehicleAdrTunnelRestrictionCode(vehicleAdrTunnelRestrictionCode: VehicleAdrTunnelRestrictionCode): VehicleRestrictions.Builder

If vehicleAdrTunnelRestrictionCode is specified, the vehicle is subject to ADR tunnel restrictions.

vehicleLoadType

fun vehicleLoadType(vehicleLoadType: VehicleLoadType): VehicleRestrictions.Builder

Specifies the vehicle load type for route calculation.

vehicleMaxSpeedInKph

fun vehicleMaxSpeedInKph(vehicleMaxSpeedInKph: Int): VehicleRestrictions.Builder

Specifies maximum speed of the vehicle in km/hour.