public final class

Player.Commands

extends java.lang.Object

 java.lang.Object

↳androidx.media3.common.Player.Commands

Overview

A set of commands.

Instances are immutable.

Summary

Fields
public static final Player.CommandsEMPTY

An empty set of commands.

Methods
public Player.Commands.BuilderbuildUpon()

Returns a Player.Commands.Builder initialized with the values of this instance.

public booleancontains(int command)

Returns whether the set of commands contains the specified Player.Command.

public booleancontainsAny(int[] commands[])

Returns whether the set of commands contains at least one of the given commands.

public booleanequals(java.lang.Object obj)

public static Player.CommandsfromBundle(Bundle bundle)

Restores a Commands from a .

public intget(int index)

Returns the Player.Command at the given index.

public inthashCode()

public intsize()

Returns the number of commands in this set.

public BundletoBundle()

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

Fields

public static final Player.Commands EMPTY

An empty set of commands.

Methods

public Player.Commands.Builder buildUpon()

Returns a Player.Commands.Builder initialized with the values of this instance.

public boolean contains(int command)

Returns whether the set of commands contains the specified Player.Command.

public boolean containsAny(int[] commands[])

Returns whether the set of commands contains at least one of the given commands.

public int size()

Returns the number of commands in this set.

public int get(int index)

Returns the Player.Command at the given index.

Parameters:

index: The index. Must be between 0 (inclusive) and Player.Commands.size() (exclusive).

Returns:

The Player.Command at the given index.

public boolean equals(java.lang.Object obj)

public int hashCode()

public Bundle toBundle()

public static Player.Commands fromBundle(Bundle bundle)

Restores a Commands from a .