docs/doc/reference/com/google/android/exoplayer2/Player.Commands.Builder.html
Package com.google.android.exoplayer2
Enclosing class:Player.Commands
public static final classPlayer.Commands.Builderextends[Object](https://developer.android.com/reference/java/lang/Object.html "class or interface in java.lang")
A builder for Player.Commands instances.
Constructors | Constructor | Description |
| --- | --- |
| Builder() |
Creates a builder.
|
All Methods Instance Methods Concrete Methods | Modifier and Type | Method | Description |
| --- | --- | --- |
| Player.Commands.Builder | add(@com.google.android.exoplayer2.Player.Command int command) |
Adds a Player.Command.
|
| Player.Commands.Builder | addAll(@com.google.android.exoplayer2.Player.Command int... commands) |
Adds commands.
|
| Player.Commands.Builder | addAll(Player.Commands commands) |
Adds Player.Commands.
|
| Player.Commands.Builder | addAllCommands() |
Adds all existing commands.
|
| Player.Commands.Builder | addIf(@com.google.android.exoplayer2.Player.Command int command, boolean condition) |
Adds a Player.Command if the provided condition is true.
|
| Player.Commands | build() |
Builds a Player.Commands instance.
|
| Player.Commands.Builder | remove(@com.google.android.exoplayer2.Player.Command int command) |
Removes a Player.Command.
|
| Player.Commands.Builder | removeAll(@com.google.android.exoplayer2.Player.Command int... commands) |
Removes commands.
|
| Player.Commands.Builder | removeIf(@com.google.android.exoplayer2.Player.Command int command, boolean condition) |
Removes a Player.Command if the provided condition is true.
|
-
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
public Builder()
Creates a builder.
-
@CanIgnoreReturnValue
public[Player.Commands.Builder](Player.Commands.Builder.html "class in com.google.android.exoplayer2")add([@Command](Player.Command.html "annotation in com.google.android.exoplayer2")@com.google.android.exoplayer2.Player.Command int command)
Adds a Player.Command.
Parameters:command - A Player.Command.Returns:This builder.Throws:IllegalStateException - If build() has already been called.
-
@CanIgnoreReturnValue
public[Player.Commands.Builder](Player.Commands.Builder.html "class in com.google.android.exoplayer2")addIf([@Command](Player.Command.html "annotation in com.google.android.exoplayer2")@com.google.android.exoplayer2.Player.Command int command,
boolean condition)
Adds a Player.Command if the provided condition is true. Does nothing otherwise.
Parameters:command - A Player.Command.condition - A condition.Returns:This builder.Throws:IllegalStateException - If build() has already been called.
-
@CanIgnoreReturnValue
public[Player.Commands.Builder](Player.Commands.Builder.html "class in com.google.android.exoplayer2")addAll([@Command](Player.Command.html "annotation in com.google.android.exoplayer2")@com.google.android.exoplayer2.Player.Command int... commands)
Adds commands.
Parameters:commands - The commands to add.Returns:This builder.Throws:IllegalStateException - If build() has already been called.
-
@CanIgnoreReturnValue
public[Player.Commands.Builder](Player.Commands.Builder.html "class in com.google.android.exoplayer2")addAll([Player.Commands](Player.Commands.html "class in com.google.android.exoplayer2")commands)
Adds Player.Commands.
Parameters:commands - The set of commands to add.Returns:This builder.Throws:IllegalStateException - If build() has already been called.
-
@CanIgnoreReturnValue
public[Player.Commands.Builder](Player.Commands.Builder.html "class in com.google.android.exoplayer2")addAllCommands()
Adds all existing commands.
Returns:This builder.Throws:IllegalStateException - If build() has already been called.
-
@CanIgnoreReturnValue
public[Player.Commands.Builder](Player.Commands.Builder.html "class in com.google.android.exoplayer2")remove([@Command](Player.Command.html "annotation in com.google.android.exoplayer2")@com.google.android.exoplayer2.Player.Command int command)
Removes a Player.Command.
Parameters:command - A Player.Command.Returns:This builder.Throws:IllegalStateException - If build() has already been called.
-
@CanIgnoreReturnValue
public[Player.Commands.Builder](Player.Commands.Builder.html "class in com.google.android.exoplayer2")removeIf([@Command](Player.Command.html "annotation in com.google.android.exoplayer2")@com.google.android.exoplayer2.Player.Command int command,
boolean condition)
Removes a Player.Command if the provided condition is true. Does nothing otherwise.
Parameters:command - A Player.Command.condition - A condition.Returns:This builder.Throws:IllegalStateException - If build() has already been called.
-
@CanIgnoreReturnValue
public[Player.Commands.Builder](Player.Commands.Builder.html "class in com.google.android.exoplayer2")removeAll([@Command](Player.Command.html "annotation in com.google.android.exoplayer2")@com.google.android.exoplayer2.Player.Command int... commands)
Removes commands.
Parameters:commands - The commands to remove.Returns:This builder.Throws:IllegalStateException - If build() has already been called.
-
public[Player.Commands](Player.Commands.html "class in com.google.android.exoplayer2")build()
Builds a Player.Commands instance.
Throws:IllegalStateException - If this method has already been called.