Android Dev Summit, October 23-24: two days of technical content, directly from the Android team. Sign-up for livestream updates.

SessionCommandGroup

class SessionCommandGroup : VersionedParcelable
kotlin.Any
   ↳ androidx.media2.session.SessionCommandGroup

A set of SessionCommand which represents a command group.

Summary

Nested classes

Builds a SessionCommandGroup object.

Public constructors

Default Constructor.

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

Creates a new SessionCommandGroup with commands copied from another object.

Public methods

Boolean
equals(other: Any?)

MutableSet<SessionCommand!>

Gets all commands of this command group.

Boolean
hasCommand(@NonNull command: SessionCommand)

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.

Int

Public constructors

<init>

SessionCommandGroup()

Default Constructor.

<init>

SessionCommandGroup(@Nullable commands: MutableCollection<SessionCommand!>?)

Creates a new SessionCommandGroup with commands copied from another object.

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

Public methods

equals

fun equals(other: Any?): Boolean

getCommands

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

Gets all commands of this command group.

hasCommand

fun hasCommand(@NonNull command: SessionCommand): Boolean

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

Parameters
command SessionCommand: 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 SessionCommand#COMMAND_CODE_CUSTOM.

hashCode

fun hashCode(): Int