Player.Commands
public final class Player.Commands
A set of commands.
Instances are immutable.
Summary
Nested types |
|---|
@UnstableApiA builder for |
Constants |
|
|---|---|
static final Player.Commands |
An empty set of commands. |
Public methods |
|
|---|---|
Player.Commands.Builder |
Returns a |
boolean |
contains(@Player.Command int command)Returns whether the set of commands contains the specified |
boolean |
containsAny(@Player.Command int[] commands)Returns whether the set of commands contains at least one of the given |
boolean |
|
static Player.Commands |
@UnstableApiRestores a |
int |
@Player.CommandReturns the |
int |
hashCode() |
int |
size()Returns the number of commands in this set. |
Bundle |
Constants
Public methods
buildUpon
@UnstableApi
public Player.Commands.Builder buildUpon()
Returns a Builder initialized with the values of this instance.
contains
public boolean contains(@Player.Command int command)
Returns whether the set of commands contains the specified Command.
containsAny
public boolean containsAny(@Player.Command int[] commands)
Returns whether the set of commands contains at least one of the given commands.
fromBundle
@UnstableApi
public static Player.Commands fromBundle(Bundle bundle)
Restores a Commands from a Bundle.
get
@Player.Command
public int get(int index)
Returns the Command at the given index.
| Parameters | |
|---|---|
int index |
The index. Must be between 0 (inclusive) and |
| Returns | |
|---|---|
int |
The |
| Throws | |
|---|---|
java.lang.IndexOutOfBoundsException |
If index is outside the allowed range. |