Speed.Builder


public final class Speed.Builder


A builder of Speed.

Summary

Public constructors

Public methods

@NonNull Speed

Constructs the Speed defined by this builder.

@NonNull Speed.Builder
setDisplaySpeedMetersPerSecond(
    @NonNull CarValue<Float> displaySpeedMetersPerSecond
)

Sets the display speed in meters per second. *

@NonNull Speed.Builder
setRawSpeedMetersPerSecond(
    @NonNull CarValue<Float> rawSpeedMetersPerSecond
)

Sets the raw speed in meters per second.

@NonNull Speed.Builder

Sets the units used to display speed from the car hardware settings.

Public constructors

Builder

Added in 1.1.0
public Builder()

Public methods

build

Added in 1.1.0
public @NonNull Speed build()

Constructs the Speed defined by this builder.

setDisplaySpeedMetersPerSecond

Added in 1.1.0
public @NonNull Speed.Builder setDisplaySpeedMetersPerSecond(
    @NonNull CarValue<Float> displaySpeedMetersPerSecond
)

Sets the display speed in meters per second. *

Throws
java.lang.NullPointerException

if displaySpeedMetersPerSecond is null

setRawSpeedMetersPerSecond

Added in 1.1.0
public @NonNull Speed.Builder setRawSpeedMetersPerSecond(
    @NonNull CarValue<Float> rawSpeedMetersPerSecond
)

Sets the raw speed in meters per second.

Throws
java.lang.NullPointerException

if rawSpeedMetersPerSecond is null

setSpeedDisplayUnit

Added in 1.1.0
public @NonNull Speed.Builder setSpeedDisplayUnit(@NonNull CarValue<Integer> speedDisplayUnit)

Sets the units used to display speed from the car hardware settings.

See CarUnit for valid speed units.

Throws
java.lang.NullPointerException

if speedDisplayUnit is null