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