SessionCommands.Builder
public final class SessionCommands.Builder
A builder for SessionCommands.
Summary
Public constructors |
|---|
Builder()Creates a new builder. |
Public methods |
|
|---|---|
SessionCommands.Builder |
@CanIgnoreReturnValueAdds a command with command code. |
SessionCommands.Builder |
@CanIgnoreReturnValueAdds a command. |
SessionCommands.Builder |
Adds all of the commands in the specified collection. |
SessionCommands |
build()Builds a |
SessionCommands.Builder |
@CanIgnoreReturnValueRemoves a command which matches a given |
SessionCommands.Builder |
@CanIgnoreReturnValueRemoves a command which matches a given |
Public constructors
Public methods
add
@CanIgnoreReturnValue
public SessionCommands.Builder add(@SessionCommand.CommandCode int commandCode)
Adds a command with command code. Command code must not be COMMAND_CODE_CUSTOM.
| Parameters | |
|---|---|
@SessionCommand.CommandCode int commandCode |
A command code to build command and add. |
| Returns | |
|---|---|
SessionCommands.Builder |
This builder for chaining. |
add
@CanIgnoreReturnValue
public SessionCommands.Builder add(SessionCommand command)
Adds a command.
| Parameters | |
|---|---|
SessionCommand command |
A command to add. |
| Returns | |
|---|---|
SessionCommands.Builder |
This builder for chaining. |
addSessionCommands
@CanIgnoreReturnValue
public SessionCommands.Builder addSessionCommands(Collection<SessionCommand> commands)
Adds all of the commands in the specified collection.
| Parameters | |
|---|---|
Collection<SessionCommand> commands |
collection containing elements to be added to this set |
| Returns | |
|---|---|
SessionCommands.Builder |
This builder for chaining. |
remove
@CanIgnoreReturnValue
public SessionCommands.Builder remove(@SessionCommand.CommandCode int commandCode)
Removes a command which matches a given command code. Command code must not be COMMAND_CODE_CUSTOM.
| Parameters | |
|---|---|
@SessionCommand.CommandCode int commandCode |
A command code to find. |
| Returns | |
|---|---|
SessionCommands.Builder |
This builder for chaining. |
remove
@CanIgnoreReturnValue
public SessionCommands.Builder remove(SessionCommand command)
Removes a command which matches a given command.
| Parameters | |
|---|---|
SessionCommand command |
A command to find. |
| Returns | |
|---|---|
SessionCommands.Builder |
This builder for chaining. |