TruckBuilder
public class TruckBuilder
extension VehicleSpecification.TruckBuilder: NativeBase
extension VehicleSpecification.TruckBuilder: Hashable
This class constructs a VehicleSpecification for a truck.
-
Creates a new instance of this class.
Declaration
Swift
public init() -
Sets the vehicle height in centimeters.
Declaration
Swift
public func withHeightInCentimeters(_ heightInCentimeters: Int32) -> VehicleSpecification.TruckBuilderParameters
heightInCentimetersThe vehicle height in centimeters.
Return Value
The
VehicleSpecification.TruckBuilderobject with the vehicle height set to the new value. -
Sets the vehicle width in centimeters.
Declaration
Swift
public func withWidthInCentimeters(_ widthInCentimeters: Int32) -> VehicleSpecification.TruckBuilderParameters
widthInCentimetersThe vehicle width in centimeters.
Return Value
The
VehicleSpecification.TruckBuilderobject with the vehicle width set to the new value. -
Sets the vehicle length in centimeters.
Declaration
Swift
public func withLengthInCentimeters(_ lengthInCentimeters: Int32) -> VehicleSpecification.TruckBuilderParameters
lengthInCentimetersThe vehicle length in centimeters.
Return Value
The
VehicleSpecification.TruckBuilderobject with the vehicle length set to the new value. -
Sets the vehicle axle count.
Declaration
Swift
public func withAxleCount(_ axleCount: Int32) -> VehicleSpecification.TruckBuilderParameters
axleCountThe vehicle axle count.
Return Value
The
VehicleSpecification.TruckBuilderobject with the axle count set to the new value. -
Sets the vehicle kingpin to rear axle distance.
Declaration
Swift
public func withKingpinToRearAxleDistanceInCentimeters(_ length: Int32) -> VehicleSpecification.TruckBuilderParameters
lengthThe distance from kingpin to the rear axle.
Return Value
The
VehicleSpecification.TruckBuilderobject with the kingpin to rear axle set to the new value. -
Sets the vehicle trailer count.
Declaration
Swift
public func withTrailerCount(_ trailerCount: Int32) -> VehicleSpecification.TruckBuilderParameters
trailerCountThe vehicle trailer count.
Return Value
The
VehicleSpecification.TruckBuilderobject with the trailer count set to the new value. -
Sets the vehicle truck category.
Declaration
Swift
public func withTruckCategory(_ truckCategory: TruckCategory) -> VehicleSpecification.TruckBuilderParameters
truckCategoryThe vehicle truck category.
Return Value
The
VehicleSpecification.TruckBuilderobject with the truck category set to the new value. -
Sets the vehicle truck light flag.
Declaration
Swift
public func withIsTruckLight(_ isTruckLight: Bool) -> VehicleSpecification.TruckBuilderParameters
isTruckLightThe vehicle truck light flag.
Return Value
The
VehicleSpecification.TruckBuilderobject with the truck light flag set to the new value. -
Sets the vehicle payload capacity in kilograms.
Declaration
Swift
public func withPayloadCapacityInKilograms(payloadCapacityInKilograms: Int32) -> VehicleSpecification.TruckBuilderParameters
payloadCapacityInKilogramsThe vehicle payload capacity in kilograms.
Return Value
The
VehicleSpecification.TruckBuilderobject with the payload capacity set to the new value. -
Sets the vehicle trailer axle count.
Declaration
Swift
public func withTrailerAxleCount(_ trailerAxleCount: Int32) -> VehicleSpecification.TruckBuilderParameters
trailerAxleCountThe vehicle trailer axle count.
Return Value
The
VehicleSpecification.TruckBuilderobject with the trailer axle count set to the new value. -
Sets the vehicle gross weight in kilograms.
Declaration
Swift
public func withGrossWeightInKilograms(_ grossWeightInKilograms: Int32) -> VehicleSpecification.TruckBuilderParameters
grossWeightInKilogramsThe vehicle gross weight in kilograms.
Return Value
The
VehicleSpecification.TruckBuilderobject with the gross weight set to the new value. -
Sets the vehicle current weight in kilograms.
Declaration
Swift
public func withCurrentWeightInKilograms(_ currentWeightInKilograms: Int32) -> VehicleSpecification.TruckBuilderParameters
currentWeightInKilogramsThe vehicle current weight in kilograms.
Return Value
The
VehicleSpecification.TruckBuilderobject with the current weight set to the new value. -
Sets the vehicle empty weight in kilograms.
Declaration
Swift
public func withEmptyWeightInKilograms(_ emptyWeightInKilograms: Int32) -> VehicleSpecification.TruckBuilderParameters
emptyWeightInKilogramsThe vehicle empty weight in kilograms.
Return Value
The
VehicleSpecification.TruckBuilderobject with the empty weight set to the new value. -
Sets the vehicle weight per axle in kilograms.
Declaration
Swift
public func withWeightPerAxleInKilograms(_ weightPerAxleInKilograms: Int32) -> VehicleSpecification.TruckBuilderParameters
weightPerAxleInKilogramsThe vehicle weight per axle in kilograms.
Return Value
The
VehicleSpecification.TruckBuilderobject with the current weight per axle set to the new value. -
Sets the vehicle weight per axle group.
Declaration
Swift
public func withWeightPerAxleGroup(_ weightPerAxleGroup: WeightPerAxleGroup) -> VehicleSpecification.TruckBuilderParameters
weightPerAxleGroupThe vehicle weight per axle group.
Return Value
The
VehicleSpecification.TruckBuilderobject with the current weight per axle group set to the new value. -
Sets the vehicle is commercial flag.
Declaration
Swift
public func withIsCommercial(_ isCommercial: Bool) -> VehicleSpecification.TruckBuilderParameters
isCommercialThe vehicle is commercial flag.
Return Value
The
VehicleSpecification.TruckBuilderobject with the is commercial flag set to the new value. -
Sets the vehicle last character of the license plate.
Declaration
Swift
public func withLastCharacterOfLicensePlate(_ lastCharacterOfLicensePlate: String) -> VehicleSpecification.TruckBuilderParameters
lastCharacterOfLicensePlateThe vehicle last character of the license plate.
Return Value
The
VehicleSpecification.TruckBuilderobject with the last character of the licence plate set to the new value. -
Sets the vehicle engine size in cubic centimeters.
Declaration
Swift
public func withEngineSizeInCubicCentimeters(_ engineSizeInCubicCentimeters: Int32) -> VehicleSpecification.TruckBuilderParameters
engineSizeInCubicCentimetersThe vehicle engine size in cubic centimeters.
Return Value
The
VehicleSpecification.TruckBuilderobject with the engine size set to the new value. -
Sets the vehicle tires count.
Declaration
Swift
public func withTiresCount(_ tiresCount: Int32) -> VehicleSpecification.TruckBuilderParameters
tiresCountThe vehicle tires count.
Return Value
The
VehicleSpecification.TruckBuilderobject with the vehicle tires count set to the new value. -
Sets the vehicle tunnel category.
Declaration
Swift
public func withTunnelCategory(_ tunnelCategory: TunnelCategory) -> VehicleSpecification.TruckBuilderParameters
tunnelCategoryThe vehicle tunnel category.
Return Value
The
VehicleSpecification.TruckBuilderobject with the vehicle tunnel category set to the new value. -
Sets the hazardous materials transported in the vehicle.
Declaration
Swift
public func withHazardousMaterials(_ hazardousMaterials: [HazardousMaterial]) -> VehicleSpecification.TruckBuilderParameters
hazardousMaterialsThe hazardous materials transported in the vehicle.
Return Value
The
VehicleSpecification.TruckBuilderobject with the hazardous materiales transported in the vehicle set to the new value. -
Sets the vehicle occupants number.
Declaration
Swift
public func withOccupancy(_ occupancy: Int32) -> VehicleSpecification.TruckBuilderParameters
occupancyThe vehicle occupants number.
Return Value
The
VehicleSpecification.TruckBuilderobject with the vehicle occupants number set to the new value. -
Builds the
VehicleSpecificationobject forTransportMode.truckwith the specifications taken from theVehicleSpecification.TruckBuilderobject.Declaration
Swift
public func build() -> VehicleSpecificationReturn Value
The
VehicleSpecificationobject created from theVehicleSpecification.TruckBuilderobject.