Builder

class Builder(vehicleConsumption: ElectricVehicleConsumption)

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

Important: This is a Public Preview API. It may be changed or removed at any time.

Constructors

Link copied to clipboard
fun Builder(vehicleConsumption: ElectricVehicleConsumption)

Functions

Link copied to clipboard
fun build(): ElectricVehicleDescriptor

Creates a new instance of the ElectricVehicleDescriptor.

Link copied to clipboard
fun vehicleDimensions(vehicleDimensions: VehicleDimensions): ElectricVehicleDescriptor.Builder

Specifies the dimensions of the vehicle.

Link copied to clipboard
fun vehicleEfficiency(vehicleEfficiency: VehicleEfficiency): ElectricVehicleDescriptor.Builder

Specifies the efficiency of the vehicle.

Link copied to clipboard
fun vehicleRestrictions(vehicleRestrictions: VehicleRestrictions): ElectricVehicleDescriptor.Builder

Specifies the restriction that this vehicle should be subjected to.