SessionCommands


public final class SessionCommands


A set of session commands.

Summary

Nested types

public final class SessionCommands.Builder

A builder for SessionCommands.

Constants

static final SessionCommands

An empty set of session commands.

Public fields

final ImmutableSet<SessionCommand>

All session commands.

Public methods

SessionCommands.Builder

Returns a Builder initialized with the values of this instance.

boolean

Returns whether a command that matches given commandCode exists.

boolean

Returns whether a command that matches given command exists.

boolean
static SessionCommands

Restores a SessionCommands from a Bundle.

int
Bundle

Constants

EMPTY

public static final SessionCommands EMPTY

An empty set of session commands.

Public fields

commands

public final ImmutableSet<SessionCommandcommands

All session commands.

Public methods

buildUpon

public SessionCommands.Builder buildUpon()

Returns a Builder initialized with the values of this instance.

contains

public boolean contains(@SessionCommand.CommandCode int commandCode)

Returns whether a command that matches given commandCode exists.

Parameters
@SessionCommand.CommandCode int commandCode

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

Returns
boolean

Whether the command exists.

contains

public boolean contains(SessionCommand command)

Returns whether a command that matches given command exists.

Parameters
SessionCommand command

A command to find.

Returns
boolean

Whether the command exists.

equals

public boolean equals(@Nullable Object obj)

fromBundle

@UnstableApi
public static SessionCommands fromBundle(Bundle bundle)

Restores a SessionCommands from a Bundle.

hashCode

public int hashCode()

toBundle

@UnstableApi
public Bundle toBundle()