Package com.google.android.exoplayer2
Class Player.Commands.Builder
- java.lang.Object
-
- com.google.android.exoplayer2.Player.Commands.Builder
-
- Enclosing class:
- Player.Commands
public static final class Player.Commands.Builder extends Object
A builder forPlayer.Commands
instances.
-
-
Constructor Summary
Constructors Constructor Description Builder()
Creates a builder.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Player.Commands.Builder
add(int command)
Adds aPlayer.Command
.Player.Commands.Builder
addAll(int... commands)
Addscommands
.Player.Commands.Builder
addAll(Player.Commands commands)
AddsPlayer.Commands
.Player.Commands.Builder
addIf(int command, boolean condition)
Adds aPlayer.Command
if the provided condition is true.Player.Commands
build()
Builds aPlayer.Commands
instance.
-
-
-
Method Detail
-
add
public Player.Commands.Builder add(@Command int command)
Adds aPlayer.Command
.- Parameters:
command
- APlayer.Command
.- Returns:
- This builder.
- Throws:
IllegalStateException
- Ifbuild()
has already been called.
-
addIf
public Player.Commands.Builder addIf(@Command int command, boolean condition)
Adds aPlayer.Command
if the provided condition is true. Does nothing otherwise.- Parameters:
command
- APlayer.Command
.condition
- A condition.- Returns:
- This builder.
- Throws:
IllegalStateException
- Ifbuild()
has already been called.
-
addAll
public Player.Commands.Builder addAll(@Command int... commands)
Addscommands
.- Parameters:
commands
- Thecommands
to add.- Returns:
- This builder.
- Throws:
IllegalStateException
- Ifbuild()
has already been called.
-
addAll
public Player.Commands.Builder addAll(Player.Commands commands)
AddsPlayer.Commands
.- Parameters:
commands
- The set ofcommands
to add.- Returns:
- This builder.
- Throws:
IllegalStateException
- Ifbuild()
has already been called.
-
build
public Player.Commands build()
Builds aPlayer.Commands
instance.- Throws:
IllegalStateException
- If this method has already been called.
-
-