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 classPlayer.Commands.BuilderA builder forPlayer.Commandsinstances.-
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>CREATORObject that can restorePlayer.Commandsfrom aBundle.static Player.CommandsEMPTYAn empty set of commands.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Player.Commands.BuilderbuildUpon()Returns aPlayer.Commands.Builderinitialized with the values of this instance.booleancontains(@com.google.android.exoplayer2.Player.Command int command)Returns whether the set of commands contains the specifiedPlayer.Command.booleancontainsAny(@com.google.android.exoplayer2.Player.Command int... commands)Returns whether the set of commands contains at least one of the givencommands.booleanequals(Object obj)@com.google.android.exoplayer2.Player.Command intget(int index)Returns thePlayer.Commandat the given index.inthashCode()intsize()Returns the number of commands in this set.BundletoBundle()Returns aBundlerepresenting 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.Commandsfrom aBundle.
-
-
Method Detail
-
buildUpon
public Player.Commands.Builder buildUpon()
Returns aPlayer.Commands.Builderinitialized 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.Commandat the given index.- Parameters:
index- The index. Must be between 0 (inclusive) andsize()(exclusive).- Returns:
- The
Player.Commandat the given index. - Throws:
IndexOutOfBoundsException- If index is outside the allowed range.
-
toBundle
public Bundle toBundle()
Description copied from interface:BundleableReturns aBundlerepresenting the information stored in this object.- Specified by:
toBundlein interfaceBundleable
-
-