OptionsBundle

@RequiresApi(21) open class OptionsBundle : Config
kotlin.Any
   ↳ androidx.camera.core.impl.OptionsBundle

An immutable implementation of Config.

OptionsBundle is a collection of Config.Options and their values which can be queried based on exact Config.Option objects or based on Option ids.

Summary

Public methods
open Boolean
containsOption(@NonNull id: Config.Option<*>)

open static OptionsBundle

Create an empty OptionsBundle.

open Unit
findOptions(@NonNull idSearchString: String, @NonNull matcher: Config.OptionMatcher)

open static OptionsBundle
from(@NonNull otherConfig: Config)

Create an OptionsBundle from another configuration.

open Config.OptionPriority
getOptionPriority(@NonNull opt: Config.Option<*>)

open MutableSet<Config.OptionPriority!>
getPriorities(@NonNull opt: Config.Option<*>)

open MutableSet<Config.Option<*>!>

open ValueT?
retrieveOption(@NonNull id: Config.Option<ValueT>)

open ValueT?
retrieveOption(@NonNull id: Config.Option<ValueT>, @Nullable valueIfMissing: ValueT?)

open ValueT?
retrieveOptionWithPriority(@NonNull id: Config.Option<ValueT>, @NonNull priority: Config.OptionPriority)

Properties
static Comparator<Config.Option<*>!>!

TreeMap<Config.Option<*>!, MutableMap<Config.OptionPriority!, Any!>!>!

Public methods

containsOption

open fun containsOption(@NonNull id: Config.Option<*>): Boolean

emptyBundle

@NonNull open static fun emptyBundle(): OptionsBundle

Create an empty OptionsBundle.

This options bundle will have no option/value pairs.

Return
OptionsBundle An OptionsBundle pre-populated with no options/values.

findOptions

open fun findOptions(
    @NonNull idSearchString: String,
    @NonNull matcher: Config.OptionMatcher
): Unit

from

@NonNull open static fun from(@NonNull otherConfig: Config): OptionsBundle

Create an OptionsBundle from another configuration.

This will copy the options/values from the provided configuration.

Parameters
otherConfig Config: Configuration containing options/values to be copied.
Return
OptionsBundle A new OptionsBundle pre-populated with options/values.

getOptionPriority

@NonNull open fun getOptionPriority(@NonNull opt: Config.Option<*>): Config.OptionPriority

getPriorities

@NonNull open fun getPriorities(@NonNull opt: Config.Option<*>): MutableSet<Config.OptionPriority!>

listOptions

@NonNull open fun listOptions(): MutableSet<Config.Option<*>!>

retrieveOption

@Nullable open fun <ValueT : Any!> retrieveOption(@NonNull id: Config.Option<ValueT>): ValueT?

retrieveOption

@Nullable open fun <ValueT : Any!> retrieveOption(
    @NonNull id: Config.Option<ValueT>,
    @Nullable valueIfMissing: ValueT?
): ValueT?

retrieveOptionWithPriority

@Nullable open fun <ValueT : Any!> retrieveOptionWithPriority(
    @NonNull id: Config.Option<ValueT>,
    @NonNull priority: Config.OptionPriority
): ValueT?

Properties

ID_COMPARE

protected static val ID_COMPARE: Comparator<Config.Option<*>!>!

mOptions

protected val mOptions: TreeMap<Config.Option<*>!, MutableMap<Config.OptionPriority!, Any!>!>!