public final class

Player.Commands.Builder

extends java.lang.Object

 java.lang.Object

↳androidx.media3.common.Player.Commands.Builder

Overview

A builder for Player.Commands instances.

Summary

Constructors
publicBuilder()

Creates a builder.

Methods
public Player.Commands.Builderadd(int command)

Adds a Player.Command.

public Player.Commands.BuilderaddAll(int[] commands[])

Adds commands.

public Player.Commands.BuilderaddAll(Player.Commands commands)

Adds Player.Commands.

public Player.Commands.BuilderaddAllCommands()

Adds all existing commands.

public Player.Commands.BuilderaddIf(int command, boolean condition)

Adds a Player.Command if the provided condition is true.

public Player.Commandsbuild()

Builds a Player.Commands instance.

public Player.Commands.Builderremove(int command)

Removes a Player.Command.

public Player.Commands.BuilderremoveAll(int[] commands[])

Removes commands.

public Player.Commands.BuilderremoveIf(int command, boolean condition)

Removes a Player.Command if the provided condition is true.

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

Constructors

public Builder()

Creates a builder.

Methods

public Player.Commands.Builder add(int command)

Adds a Player.Command.

Parameters:

command: A Player.Command.

Returns:

This builder.

public Player.Commands.Builder addIf(int command, boolean condition)

Adds a Player.Command if the provided condition is true. Does nothing otherwise.

Parameters:

command: A Player.Command.
condition: A condition.

Returns:

This builder.

public Player.Commands.Builder addAll(int[] commands[])

Adds commands.

Parameters:

commands: The commands to add.

Returns:

This builder.

Adds Player.Commands.

Parameters:

commands: The set of commands to add.

Returns:

This builder.

public Player.Commands.Builder addAllCommands()

Adds all existing commands.

Returns:

This builder.

public Player.Commands.Builder remove(int command)

Removes a Player.Command.

Parameters:

command: A Player.Command.

Returns:

This builder.

public Player.Commands.Builder removeIf(int command, boolean condition)

Removes a Player.Command if the provided condition is true. Does nothing otherwise.

Parameters:

command: A Player.Command.
condition: A condition.

Returns:

This builder.

public Player.Commands.Builder removeAll(int[] commands[])

Removes commands.

Parameters:

commands: The commands to remove.

Returns:

This builder.

public Player.Commands build()

Builds a Player.Commands instance.