Package com.google.android.exoplayer2
Class Player.Commands
- java.lang.Object
-
- com.google.android.exoplayer2.Player.Commands
-
- All Implemented Interfaces:
Bundleable
- Enclosing interface:
- Player
public static final class Player.Commands extends Object implements Bundleable
A set of commands.Instances are immutable.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Player.Commands.Builder
A builder forPlayer.Commands
instances.-
Nested classes/interfaces inherited from interface com.google.android.exoplayer2.Bundleable
Bundleable.Creator<T extends Bundleable>
-
-
Field Summary
Fields Modifier and Type Field Description static Bundleable.Creator<Player.Commands>
CREATOR
Object that can restorePlayer.Commands
from aBundle
.static Player.Commands
EMPTY
An empty set of commands.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Player.Commands.Builder
buildUpon()
Returns aPlayer.Commands.Builder
initialized with the values of this instance.boolean
contains(@com.google.android.exoplayer2.Player.Command int command)
Returns whether the set of commands contains the specifiedPlayer.Command
.boolean
containsAny(@com.google.android.exoplayer2.Player.Command int... commands)
Returns whether the set of commands contains at least one of the givencommands
.boolean
equals(Object obj)
@com.google.android.exoplayer2.Player.Command int
get(int index)
Returns thePlayer.Command
at the given index.int
hashCode()
int
size()
Returns the number of commands in this set.Bundle
toBundle()
Returns aBundle
representing the information stored in this object.
-
-
-
Field Detail
-
EMPTY
public static final Player.Commands EMPTY
An empty set of commands.
-
CREATOR
public static final Bundleable.Creator<Player.Commands> CREATOR
Object that can restorePlayer.Commands
from aBundle
.
-
-
Method Detail
-
buildUpon
public Player.Commands.Builder buildUpon()
Returns aPlayer.Commands.Builder
initialized with the values of this instance.
-
contains
public boolean contains(@Command @com.google.android.exoplayer2.Player.Command int command)
Returns whether the set of commands contains the specifiedPlayer.Command
.
-
containsAny
public boolean containsAny(@Command @com.google.android.exoplayer2.Player.Command int... commands)
Returns whether the set of commands contains at least one of the givencommands
.
-
size
public int size()
Returns the number of commands in this set.
-
get
@Command public @com.google.android.exoplayer2.Player.Command int get(int index)
Returns thePlayer.Command
at the given index.- Parameters:
index
- The index. Must be between 0 (inclusive) andsize()
(exclusive).- Returns:
- The
Player.Command
at the given index. - Throws:
IndexOutOfBoundsException
- If index is outside the allowed range.
-
toBundle
public Bundle toBundle()
Description copied from interface:Bundleable
Returns aBundle
representing the information stored in this object.- Specified by:
toBundle
in interfaceBundleable
-
-