Builder

class Builder

Builder used to create an instance of VehicleEfficiency. 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()

Functions

Link copied to clipboard
fun accelerationEfficiency(accelerationEfficiency: Double): VehicleEfficiency.Builder

Specifies the efficiency of converting chemical energy stored in fuel to kinetic energy when the vehicle accelerates.

Link copied to clipboard
fun build(): VehicleEfficiency

Creates a new instance of the VehicleEfficiency.

Link copied to clipboard
fun decelerationEfficiency(decelerationEfficiency: Double): VehicleEfficiency.Builder

Specifies the efficiency of converting kinetic energy to saved (not consumed) fuel when the vehicle decelerates.

Link copied to clipboard
fun downhillEfficiency(downhillEfficiency: Double): VehicleEfficiency.Builder

Specifies the efficiency of converting potential energy to saved (not consumed) fuel when the vehicle loses elevation.

Link copied to clipboard
fun uphillEfficiency(uphillEfficiency: Double): VehicleEfficiency.Builder

Specifies the efficiency of converting chemical energy stored in fuel to potential energy when the vehicle gains elevation.