public final class

ActionsConstraints.Builder

extends java.lang.Object

 java.lang.Object

↳androidx.car.app.model.constraints.ActionsConstraints.Builder

Overview

A builder of ActionsConstraints.

Summary

Constructors
publicBuilder()

Returns an empty ActionsConstraints.Builder instance.

publicBuilder(ActionsConstraints constraints)

Returns a new builder that contains the same data as the given ActionsConstraints instance.

Methods
public ActionsConstraints.BuilderaddDisallowedActionType(int actionType)

Adds an action type to the set of disallowed types.

public ActionsConstraints.BuilderaddRequiredActionType(int actionType)

Adds an action type to the set of required types.

public ActionsConstraintsbuild()

Returns an ActionsConstraints instance defined by this builder.

public ActionsConstraints.BuildersetMaxActions(int maxActions)

Sets the maximum number of actions allowed.

public ActionsConstraints.BuildersetMaxCustomTitles(int maxCustomTitles)

Sets the maximum number of actions with custom titles allowed.

public ActionsConstraints.BuildersetMaxPrimaryActions(int maxPrimaryActions)

Sets the maximum number of primary actions allowed.

public ActionsConstraints.BuildersetTitleTextConstraints(CarTextConstraints carTextConstraints)

Sets the CarTextConstraints for the title.

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

Constructors

public Builder()

Returns an empty ActionsConstraints.Builder instance.

public Builder(ActionsConstraints constraints)

Returns a new builder that contains the same data as the given ActionsConstraints instance.

Methods

public ActionsConstraints.Builder setMaxActions(int maxActions)

Sets the maximum number of actions allowed.

public ActionsConstraints.Builder setMaxPrimaryActions(int maxPrimaryActions)

Sets the maximum number of primary actions allowed.

public ActionsConstraints.Builder setMaxCustomTitles(int maxCustomTitles)

Sets the maximum number of actions with custom titles allowed.

public ActionsConstraints.Builder setTitleTextConstraints(CarTextConstraints carTextConstraints)

Sets the CarTextConstraints for the title.

public ActionsConstraints.Builder addRequiredActionType(int actionType)

Adds an action type to the set of required types.

public ActionsConstraints.Builder addDisallowedActionType(int actionType)

Adds an action type to the set of disallowed types.

public ActionsConstraints build()

Returns an ActionsConstraints instance defined by this builder.