TagBundle

@RequiresApi(21) open class TagBundle
kotlin.Any
   ↳ androidx.camera.core.impl.TagBundle

A TagBundle is an immutable tags collection which does not allow insertion/removal.

Summary

Protected constructors
TagBundle(@NonNull tagMap: MutableMap<String!, Any!>)

Public methods
open static TagBundle
create(@NonNull source: Pair<String!, Any!>)

Creates a TagBundle with one entry.

open static TagBundle

Creates an empty TagBundle.

open static TagBundle
from(@NonNull otherTagBundle: TagBundle)

Creates a TagBundle from another TagBundle.

open Any?
getTag(@NonNull key: String)

Gets the tag associated with the key.

open MutableSet<String!>

Lists all keys contained within this TagBundle.

Properties
MutableMap<String!, Any!>!

It is used to store all the keys and Tags

Protected constructors

TagBundle

protected TagBundle(@NonNull tagMap: MutableMap<String!, Any!>)

Public methods

create

@NonNull open static fun create(@NonNull source: Pair<String!, Any!>): TagBundle

Creates a TagBundle with one entry.

Return
TagBundle a TagBundle containing one tag.

emptyBundle

@NonNull open static fun emptyBundle(): TagBundle

Creates an empty TagBundle.

Return
TagBundle an empty TagBundle containing no tag.

from

@NonNull open static fun from(@NonNull otherTagBundle: TagBundle): TagBundle

Creates a TagBundle from another TagBundle.

This will copy keys and values from the provided TagBundle.

Parameters
otherTagBundle TagBundle: TagBundle containing keys/values to be copied.
Return
TagBundle A new TagBundle pre-populated with keys/values.

getTag

@Nullable open fun getTag(@NonNull key: String): Any?

Gets the tag associated with the key.

Parameters
key String: The key for query.
Return
Any? The tag associated with the key.

listKeys

@NonNull open fun listKeys(): MutableSet<String!>

Lists all keys contained within this TagBundle.

Return
MutableSet<String!> A Set of keys contained within this configuration. It returns an empty set if there are no keys in this TagBundle.

Properties

mTagMap

protected val mTagMap: MutableMap<String!, Any!>!

It is used to store all the keys and Tags