Save the date! Android Dev Summit is coming to Sunnyvale, CA on Oct 23-24, 2019.

SessionCommandGroup2

class SessionCommandGroup2 : VersionedParcelable
kotlin.Any
   ↳ androidx.media2.SessionCommandGroup2

A set of SessionCommand2 which represents a command group.

Summary

Nested classes

Builds a SessionCommandGroup2 object.

Public constructors

Default Constructor.

<init>(@Nullable commands: MutableCollection<SessionCommand2!>?)

Creates a new SessionCommandGroup2 with commands copied from another object.

Public methods
Boolean
hasCommand(@NonNull command: SessionCommand2)

Checks whether this command group has a command that matches given command.

Boolean
hasCommand(commandCode: Int)

Checks whether this command group has a command that matches given commandCode.

MutableSet<SessionCommand2!>

Gets all commands of this command group.

Public constructors

<init>

SessionCommandGroup2()

Default Constructor.

<init>

SessionCommandGroup2(@Nullable commands: MutableCollection<SessionCommand2!>?)

Creates a new SessionCommandGroup2 with commands copied from another object.

Parameters
commands MutableCollection<SessionCommand2!>?: The collection of commands to copy.

Public methods

hasCommand

fun hasCommand(@NonNull command: SessionCommand2): Boolean

Checks whether this command group has a command that matches given command.

Parameters
command SessionCommand2: A command to find. Shouldn't be null.

hasCommand

fun hasCommand(commandCode: Int): Boolean

Checks whether this command group has a command that matches given commandCode.

Parameters
commandCode Int: A command code to find. Shouldn't be SessionCommand2#COMMAND_CODE_CUSTOM.

getCommands

@NonNull fun getCommands(): MutableSet<SessionCommand2!>

Gets all commands of this command group.