Vehicle

abstract class Vehicle

Specifies the vehicle (or lack of one).

Parameters

type

The type of the vehicle.

Inheritors

Types

Link copied to clipboard
data class Bicycle(val maxSpeed: Speed = Speed.kilometersPerHour(BICYCLE_SPEED_KMH)) : Vehicle

A vehicle of type bicycle.

Link copied to clipboard
data class Bus(val maxSpeed: Speed? = null, val isCommercial: Boolean = true, val electricEngine: ElectricEngine? = null, val combustionEngine: CombustionEngine? = null, val dimensions: VehicleDimensions? = null, val modelId: String? = null) : Vehicle, Motorized

A vehicle of type bus.

Link copied to clipboard
data class Car(val maxSpeed: Speed? = null, val isCommercial: Boolean = false, val electricEngine: ElectricEngine? = null, val combustionEngine: CombustionEngine? = null, val dimensions: VehicleDimensions? = null, val modelId: String? = null) : Vehicle, Motorized

A vehicle of type car.

Link copied to clipboard
data class Motorcycle(val maxSpeed: Speed? = null, val isCommercial: Boolean = false, val electricEngine: ElectricEngine? = null, val combustionEngine: CombustionEngine? = null, val dimensions: VehicleDimensions? = null, val modelId: String? = null) : Vehicle, Motorized

A vehicle of type motorcycle.

Link copied to clipboard
data class Pedestrian(val maxSpeed: Speed = Speed.kilometersPerHour(PEDESTRIAN_SPEED_KMH)) : Vehicle

A pedestrian.

Link copied to clipboard
data class Taxi(val maxSpeed: Speed? = null, val isCommercial: Boolean = true, val electricEngine: ElectricEngine? = null, val combustionEngine: CombustionEngine? = null, val dimensions: VehicleDimensions? = null, val modelId: String? = null) : Vehicle, Motorized

A vehicle of type taxi.

Link copied to clipboard
data class Truck(val maxSpeed: Speed? = null, val isCommercial: Boolean = true, val electricEngine: ElectricEngine? = null, val combustionEngine: CombustionEngine? = null, val dimensions: VehicleDimensions? = null, val hazmatClasses: Set<HazmatClass> = emptySet(), val adrTunnelRestrictionCode: AdrTunnelRestrictionCode? = null, val modelId: String? = null) : Vehicle, Motorized, CargoCapable

A vehicle of type truck.

Link copied to clipboard
data class Van(val maxSpeed: Speed? = null, val isCommercial: Boolean = false, val electricEngine: ElectricEngine? = null, val combustionEngine: CombustionEngine? = null, val dimensions: VehicleDimensions? = null, val modelId: String? = null, val hazmatClasses: Set<HazmatClass> = emptySet(), val adrTunnelRestrictionCode: AdrTunnelRestrictionCode? = null) : Vehicle, Motorized, CargoCapable

A vehicle of type van.

Properties

Link copied to clipboard
abstract val maxSpeed: Speed?

The maximum speed of the vehicle.

Link copied to clipboard