Back to Exoplayer

FlagSet.Builder (ExoPlayer library)

docs/doc/reference/com/google/android/exoplayer2/util/FlagSet.Builder.html

latest4.8 KB
Original Source

Package com.google.android.exoplayer2.util

Class FlagSet.Builder


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.

Constructor Summary

Constructors | Constructor | Description | | --- | --- | | Builder() | Creates a builder. |

Method Summary

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. |

- 

Methods inherited from class java.lang.Object

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

Constructor Detail

- 

Builder

public Builder()

Creates a builder.

Method Detail

- 

add

@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.

- 

addIf

@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.

- 

addAll

@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.

- 

addAll

@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.

- 

remove

@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.

- 

removeIf

@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.

- 

removeAll

@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.

- 

build

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.