public abstract class

PropertyIdAreaId

extends java.lang.Object

 java.lang.Object

↳androidx.car.app.hardware.common.PropertyIdAreaId

Gradle dependencies

compile group: 'androidx.car.app', name: 'app-automotive', version: '1.7.0-beta01'

  • groupId: androidx.car.app
  • artifactId: app-automotive
  • version: 1.7.0-beta01

Artifact androidx.car.app:app-automotive:1.7.0-beta01 it located at Google repository (https://maven.google.com/)

Overview

Container class for information about property Ids and area Ids.

The hash code generated by the auto class is used as uId.

Summary

Constructors
publicPropertyIdAreaId()

Methods
public static PropertyIdAreaId.Builderbuilder()

Get a builder class for PropertyIdAreaId

public abstract intgetAreaId()

Returns one of area Ids in .

public abstract intgetPropertyId()

Returns one of the property Ids in .

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

Constructors

public PropertyIdAreaId()

Methods

public abstract int getPropertyId()

Returns one of the property Ids in .

public abstract int getAreaId()

Returns one of area Ids in .

public static PropertyIdAreaId.Builder builder()

Get a builder class for PropertyIdAreaId

Source

/*
 * Copyright 2022 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package androidx.car.app.hardware.common;

import static androidx.annotation.RestrictTo.Scope.LIBRARY;

import androidx.annotation.NonNull;
import androidx.annotation.OptIn;
import androidx.annotation.RestrictTo;
import androidx.car.app.annotations.ExperimentalCarApi;

import com.google.auto.value.AutoValue;

/**
 * Container class for information about property Ids and area Ids.
 *
 * <p>The hash code generated by the auto class is used as uId.
 */
@RestrictTo(LIBRARY)
@AutoValue
public abstract class PropertyIdAreaId {

    /** Returns one of the property Ids in {@link android.car.VehiclePropertyIds}. */
    public abstract int getPropertyId();

    /** Returns one of area Ids in {@link android.car.VehicleAreaSeat}. */
    public abstract int getAreaId();

    /** Get a builder class for {@link PropertyIdAreaId}*/
    @NonNull
    @OptIn(markerClass = ExperimentalCarApi.class)
    public static PropertyIdAreaId.Builder builder() {
        return new AutoValue_PropertyIdAreaId.Builder().setAreaId(0);
    }

    /**
     * A builder for {@link PropertyIdAreaId}
     */
    @AutoValue.Builder
    public abstract static class Builder {
        /** Sets a property ID for the {@link PropertyIdAreaId}. */
        @NonNull
        public abstract PropertyIdAreaId.Builder setPropertyId(int propertyId);

        /** Sets an area Id for the {@link PropertyIdAreaId}. */
        @NonNull
        public abstract PropertyIdAreaId.Builder setAreaId(int areaId);

        /** Create an instance of {@link PropertyIdAreaId}. */
        @NonNull
        public abstract PropertyIdAreaId build();
    }

}