public abstract class

CarPropertyResponse.Builder<T>

extends java.lang.Object

 java.lang.Object

↳androidx.car.app.hardware.common.CarPropertyResponse.Builder<T>

Overview

A builder for CarPropertyResponse

Summary

Constructors
publicBuilder()

Methods
public final CarPropertyResponse<java.lang.Object>build()

Create an instance of CarPropertyResponse.

public abstract CarPropertyResponse.Builder<java.lang.Object>setCarZones(java.util.List<CarZone> carZones)

Sets the list of CarZones for the CarPropertyResponse.

public abstract CarPropertyResponse.Builder<java.lang.Object>setPropertyId(int propertyId)

Sets a property ID for the CarPropertyResponse.

public abstract CarPropertyResponse.Builder<java.lang.Object>setStatus(int status)

Sets a status code for the CarPropertyResponse.

public abstract CarPropertyResponse.Builder<java.lang.Object>setTimestampMillis(long timestampMillis)

Sets a timestamp for the CarPropertyResponse.

public abstract CarPropertyResponse.Builder<java.lang.Object>setValue(java.lang.Object value)

Sets a value for the CarPropertyResponse.

from java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructors

public Builder()

Methods

public abstract CarPropertyResponse.Builder<java.lang.Object> setPropertyId(int propertyId)

Sets a property ID for the CarPropertyResponse.

public abstract CarPropertyResponse.Builder<java.lang.Object> setTimestampMillis(long timestampMillis)

Sets a timestamp for the CarPropertyResponse.

public abstract CarPropertyResponse.Builder<java.lang.Object> setValue(java.lang.Object value)

Sets a value for the CarPropertyResponse.

If set with a non null value, then CarPropertyResponse.Builder.setStatus(int) must be set with CarValue.STATUS_SUCCESS. If this condition is not met, CarPropertyResponse.Builder.build() will throw an java.lang.IllegalArgumentException.

public abstract CarPropertyResponse.Builder<java.lang.Object> setStatus(int status)

Sets a status code for the CarPropertyResponse.

If status is set to CarValue.STATUS_SUCCESS, then CarPropertyResponse.Builder.setValue(T) must be set with a non null value. If this condition is not met, CarPropertyResponse.Builder.build() will throw an java.lang.IllegalArgumentException.

public abstract CarPropertyResponse.Builder<java.lang.Object> setCarZones(java.util.List<CarZone> carZones)

Sets the list of CarZones for the CarPropertyResponse.

public final CarPropertyResponse<java.lang.Object> build()

Create an instance of CarPropertyResponse.