SessionCommandGroup

Added in 1.0.0
Deprecated in 1.3.0

public final class SessionCommandGroup implements VersionedParcelable


A set of SessionCommand which represents a command group.

Summary

Nested types

public final class SessionCommandGroup.Builder

This class is deprecated.

androidx.media2 is deprecated.

Public constructors

Default Constructor.

Creates a new SessionCommandGroup with commands copied from another object.

Public methods

boolean
@NonNull Set<SessionCommand>

Gets all commands of this command group.

boolean
hasCommand(int commandCode)

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

boolean

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

int

Public constructors

SessionCommandGroup

Added in 1.0.0
Deprecated in 1.3.0
public SessionCommandGroup()

Default Constructor.

SessionCommandGroup

Added in 1.0.0
Deprecated in 1.3.0
public SessionCommandGroup(@Nullable Collection<SessionCommand> commands)

Creates a new SessionCommandGroup with commands copied from another object.

Parameters
@Nullable Collection<SessionCommand> commands

The collection of commands to copy.

Public methods

equals

public boolean equals(Object obj)

getCommands

Added in 1.0.0
Deprecated in 1.3.0
public @NonNull Set<SessionCommandgetCommands()

Gets all commands of this command group.

hasCommand

Added in 1.0.0
Deprecated in 1.3.0
public boolean hasCommand(int commandCode)

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

Parameters
int commandCode

A command code to find. Shouldn't be COMMAND_CODE_CUSTOM.

hasCommand

Added in 1.0.0
Deprecated in 1.3.0
public boolean hasCommand(@NonNull SessionCommand command)

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

Parameters
@NonNull SessionCommand command

A command to find. Shouldn't be null.

hashCode

public int hashCode()