public final class

FlagSet.Builder

extends java.lang.Object

 java.lang.Object

↳androidx.media3.common.FlagSet.Builder

Overview

A builder for FlagSet instances.

Summary

Constructors
publicBuilder()

Creates a builder.

Methods
public FlagSet.Builderadd(int flag)

Adds a flag.

public FlagSet.BuilderaddAll(FlagSet flags)

Adds flags.

public FlagSet.BuilderaddAll(int[] flags[])

Adds flags.

public FlagSet.BuilderaddIf(int flag, boolean condition)

Adds a flag if the provided condition is true.

public FlagSetbuild()

Builds an FlagSet instance.

public FlagSet.Builderremove(int flag)

Removes a flag.

public FlagSet.BuilderremoveAll(int[] flags[])

Removes flags.

public FlagSet.BuilderremoveIf(int flag, boolean condition)

Removes a flag if the provided condition is true.

from java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructors

public Builder()

Creates a builder.

Methods

public FlagSet.Builder add(int flag)

Adds a flag.

Parameters:

flag: A flag.

Returns:

This builder.

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

public FlagSet.Builder addAll(int[] flags[])

Adds flags.

Parameters:

flags: The flags to add.

Returns:

This builder.

public FlagSet.Builder addAll(FlagSet flags)

Adds flags.

Parameters:

flags: The set of flags to add.

Returns:

This builder.

public FlagSet.Builder remove(int flag)

Removes a flag.

Parameters:

flag: A flag.

Returns:

This builder.

public FlagSet.Builder 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.

public FlagSet.Builder removeAll(int[] flags[])

Removes flags.

Parameters:

flags: The flags to remove.

Returns:

This builder.

public FlagSet build()

Builds an FlagSet instance.