SessionCommands.Builder


class SessionCommands.Builder


A builder for SessionCommands.

Summary

Public constructors

Creates a new builder.

Public functions

SessionCommands.Builder!

Adds a command with command code.

SessionCommands.Builder!

Adds a command.

SessionCommands.Builder!

Adds all of the commands in the specified collection.

SessionCommands!

Builds a SessionCommands.

SessionCommands.Builder!

Removes a command which matches a given command code.

SessionCommands.Builder!

Removes a command which matches a given command.

Public constructors

Builder

Builder()

Creates a new builder.

Public functions

add

@CanIgnoreReturnValue
fun add(@SessionCommand.CommandCode commandCode: Int): SessionCommands.Builder!

Adds a command with command code. Command code must not be COMMAND_CODE_CUSTOM.

Parameters
@SessionCommand.CommandCode commandCode: Int

A command code to build command and add.

Returns
SessionCommands.Builder!

This builder for chaining.

add

@CanIgnoreReturnValue
fun add(command: SessionCommand!): SessionCommands.Builder!

Adds a command.

Parameters
command: SessionCommand!

A command to add.

Returns
SessionCommands.Builder!

This builder for chaining.

addSessionCommands

@CanIgnoreReturnValue
fun addSessionCommands(commands: (Mutable)Collection<SessionCommand!>!): SessionCommands.Builder!

Adds all of the commands in the specified collection.

Parameters
commands: (Mutable)Collection<SessionCommand!>!

collection containing elements to be added to this set

Returns
SessionCommands.Builder!

This builder for chaining.

build

fun build(): SessionCommands!

Builds a SessionCommands.

remove

@CanIgnoreReturnValue
fun remove(@SessionCommand.CommandCode commandCode: Int): SessionCommands.Builder!

Removes a command which matches a given command code. Command code must not be COMMAND_CODE_CUSTOM.

Parameters
@SessionCommand.CommandCode commandCode: Int

A command code to find.

Returns
SessionCommands.Builder!

This builder for chaining.

remove

@CanIgnoreReturnValue
fun remove(command: SessionCommand!): SessionCommands.Builder!

Removes a command which matches a given command.

Parameters
command: SessionCommand!

A command to find.

Returns
SessionCommands.Builder!

This builder for chaining.