Mileage.Builder


public final class Mileage.Builder


A builder of Mileage.

Summary

Public constructors

Public methods

@NonNull Mileage

Constructs the Mileage defined by this builder.

@NonNull Mileage.Builder

Sets the mileage display unit.

@NonNull Mileage.Builder

Sets the odometer value in meters.

Public constructors

Builder

Added in 1.1.0
public Builder()

Public methods

build

Added in 1.1.0
public @NonNull Mileage build()

Constructs the Mileage defined by this builder.

setDistanceDisplayUnit

Added in 1.1.0
public @NonNull Mileage.Builder setDistanceDisplayUnit(@NonNull CarValue<Integer> mileageDisplayUnit)

Sets the mileage display unit.

Valid values are in CarUnit.

Throws
java.lang.NullPointerException

if mileageDisplayUnit is null

setOdometerMeters

Added in 1.1.0
public @NonNull Mileage.Builder setOdometerMeters(@NonNull CarValue<Float> odometerMeters)

Sets the odometer value in meters.

Throws
java.lang.NullPointerException

if odometer is null