Class ExoFlags.Builder
- java.lang.Object
-
- com.google.android.exoplayer2.util.ExoFlags.Builder
-
-
Constructor Summary
Constructors Constructor Description Builder()Creates a builder.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ExoFlags.Builderadd(int flag)Adds a flag.ExoFlags.BuilderaddAll(int... flags)Adds flags.ExoFlags.BuilderaddAll(ExoFlags flags)Addsflags.ExoFlags.BuilderaddIf(int flag, boolean condition)Adds a flag if the provided condition is true.ExoFlagsbuild()Builds anExoFlagsinstance.
-
-
-
Method Detail
-
add
public ExoFlags.Builder add(int flag)
Adds a flag.- Parameters:
flag- A flag.- Returns:
- This builder.
- Throws:
IllegalStateException- Ifbuild()has already been called.
-
addIf
public ExoFlags.Builder addIf(int flag, boolean condition)
Adds a flag if the provided condition is true. Does nothing otherwise.- Parameters:
flag- A flag.condition- A condition.- Returns:
- This builder.
- Throws:
IllegalStateException- Ifbuild()has already been called.
-
addAll
public ExoFlags.Builder addAll(int... flags)
Adds flags.- Parameters:
flags- The flags to add.- Returns:
- This builder.
- Throws:
IllegalStateException- Ifbuild()has already been called.
-
addAll
public ExoFlags.Builder addAll(ExoFlags flags)
Addsflags.- Parameters:
flags- The set of flags to add.- Returns:
- This builder.
- Throws:
IllegalStateException- Ifbuild()has already been called.
-
build
public ExoFlags build()
Builds anExoFlagsinstance.- Throws:
IllegalStateException- If this method has already been called.
-
-