Player.Commands


class Player.Commands : Bundleable


A set of commands.

Instances are immutable.

Summary

Nested types

A builder for Commands instances.

Constants

const Bundleable.Creator<Player.Commands!>!

This property is deprecated.

Use fromBundle instead.

const Player.Commands!

An empty set of commands.

Public functions

Player.Commands.Builder!

Returns a Builder initialized with the values of this instance.

Boolean

Returns whether the set of commands contains the specified Command.

Boolean

Returns whether the set of commands contains at least one of the given commands.

Boolean
equals(obj: Any?)
java-static Player.Commands!

Restores a Commands from a Bundle.

Int

Returns the Command at the given index.

Int
Int

Returns the number of commands in this set.

Bundle!

Returns a Bundle representing the information stored in this object.

Constants

CREATOR

@UnstableApi
const val CREATORBundleable.Creator<Player.Commands!>!

Object that can restore Commands from a Bundle.

EMPTY

const val EMPTYPlayer.Commands!

An empty set of commands.

Public functions

buildUpon

@UnstableApi
fun buildUpon(): Player.Commands.Builder!

Returns a Builder initialized with the values of this instance.

contains

fun contains(@Player.Command command: Int): Boolean

Returns whether the set of commands contains the specified Command.

containsAny

fun containsAny(@Player.Command commands: IntArray!): Boolean

Returns whether the set of commands contains at least one of the given commands.

equals

fun equals(obj: Any?): Boolean

fromBundle

@UnstableApi
java-static fun fromBundle(bundle: Bundle!): Player.Commands!

Restores a Commands from a Bundle.

get

@Player.Command
fun get(index: Int): Int

Returns the Command at the given index.

Parameters
index: Int

The index. Must be between 0 (inclusive) and size (exclusive).

Returns
Int

The Command at the given index.

Throws
java.lang.IndexOutOfBoundsException

If index is outside the allowed range.

hashCode

fun hashCode(): Int

size

fun size(): Int

Returns the number of commands in this set.

toBundle

@UnstableApi
fun toBundle(): Bundle!

Returns a Bundle representing the information stored in this object.