Back to Exoplayer

Player.Commands (ExoPlayer library)

docs/doc/reference/com/google/android/exoplayer2/Player.Commands.html

latest6.1 KB
Original Source

Package com.google.android.exoplayer2

Class Player.Commands

  • java.lang.Object

    • com.google.android.exoplayer2.Player.Commands
  • All Implemented Interfaces:BundleableEnclosing interface:Player


public static final classPlayer.Commandsextends[Object](https://developer.android.com/reference/java/lang/Object.html "class or interface in java.lang")implements[Bundleable](Bundleable.html "interface in com.google.android.exoplayer2")

A set of commands.

Instances are immutable.

Nested Class Summary

Nested Classes | Modifier and Type | Class | Description | | --- | --- | --- | | static class | Player.Commands.Builder | A builder for Player.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 restore Player.Commands from a Bundle. | | 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 a Player.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 specified Player.Command. | | boolean | containsAny​(@com.google.android.exoplayer2.Player.Command int... commands) | Returns whether the set of commands contains at least one of the given commands. | | boolean | equals​(Object obj) | | | @com.google.android.exoplayer2.Player.Command int | get​(int index) | Returns the Player.Command at the given index. | | int | hashCode() | | | int | size() | Returns the number of commands in this set. | | Bundle | toBundle() | Returns a Bundle representing the information stored in this object. |

- 

Methods inherited from class java.lang.Object

clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait

Field Detail

- 

EMPTY

public static final[Player.Commands](Player.Commands.html "class in com.google.android.exoplayer2")EMPTY

An empty set of commands.

- 

CREATOR

public static final[Bundleable.Creator](Bundleable.Creator.html "interface in com.google.android.exoplayer2")<[Player.Commands](Player.Commands.html "class in com.google.android.exoplayer2")> CREATOR

Object that can restore Player.Commands from a Bundle.

Method Detail

- 

buildUpon

public[Player.Commands.Builder](Player.Commands.Builder.html "class in com.google.android.exoplayer2")buildUpon()

Returns a Player.Commands.Builder initialized with the values of this instance.

- 

contains

public boolean contains​([@Command](Player.Command.html "annotation in com.google.android.exoplayer2")@com.google.android.exoplayer2.Player.Command int command)

Returns whether the set of commands contains the specified Player.Command.

- 

containsAny

public boolean containsAny​([@Command](Player.Command.html "annotation in com.google.android.exoplayer2")@com.google.android.exoplayer2.Player.Command int... commands)

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

- 

size

public int size()

Returns the number of commands in this set.

- 

get

[@Command](Player.Command.html "annotation in com.google.android.exoplayer2")public @com.google.android.exoplayer2.Player.Command int get​(int index)

Returns the Player.Command at the given index. Parameters:index - The index. Must be between 0 (inclusive) and size() (exclusive).Returns:The Player.Command at the given index.Throws:IndexOutOfBoundsException - If index is outside the allowed range.

- 

equals

public boolean equals​(@Nullable[Object](https://developer.android.com/reference/java/lang/Object.html "class or interface in java.lang")obj)

Overrides:equals in class Object

- 

hashCode

public int hashCode()

Overrides:hashCode in class Object

- 

toBundle

public[Bundle](https://developer.android.com/reference/android/os/Bundle.html "class or interface in android.os")toBundle()

Description copied from interface: Bundleable

Returns a Bundle representing the information stored in this object. Specified by:toBundle in interface Bundleable