Model.Builder

public static final class Model.Builder
extends Object

java.lang.Object
   ↳ androidx.car.app.hardware.info.Model.Builder


A builder of Model.

Summary

Public constructors

Builder()

Public methods

Model build()

Constructs the Model defined by this builder.

Model.Builder setManufacturer(CarValue<String> manufacturer)

Sets the car manufacturer.

Model.Builder setName(CarValue<String> name)

Sets the car model name.

Model.Builder setYear(CarValue<Integer> year)

Sets the car model year.

Inherited methods

Public constructors

Builder

public Builder ()

Public methods

build

public Model build ()

Constructs the Model defined by this builder.

Returns
Model

setManufacturer

public Model.Builder setManufacturer (CarValue<String> manufacturer)

Sets the car manufacturer.

Parameters
manufacturer CarValue

Returns
Model.Builder

Throws
NullPointerException if manufacturer is null

setName

public Model.Builder setName (CarValue<String> name)

Sets the car model name.

Parameters
name CarValue

Returns
Model.Builder

Throws
NullPointerException if name is null

setYear

public Model.Builder setYear (CarValue<Integer> year)

Sets the car model year.

Parameters
year CarValue

Returns
Model.Builder

Throws
NullPointerException if year is null