Added in API level 30

AudioMetadataReadMap

interface AudioMetadataReadMap
android.media.AudioMetadataReadMap

A read only Map-style interface of AudioMetadata.Key value pairs used for AudioMetadata.

Using a AudioMetadata.Key interface, this map looks up the corresponding value. Read-only maps are thread-safe for lookup, but the underlying object values may need their own thread protection if mutable.

{@see AudioMetadataMap}

Summary

Public methods
abstract Boolean

Returns true if the key exists in the map.

abstract AudioMetadataMap
dup()

Returns a copy of the map.

abstract T?

Returns the value associated with the key.

abstract Int

Returns the number of elements in the map.

Public methods

containsKey

Added in API level 30
abstract fun <T : Any!> containsKey(key: AudioMetadata.Key<T>): Boolean

Returns true if the key exists in the map.

Parameters
key AudioMetadata.Key<T>: interface for requesting the value. This value cannot be null.
<T> type of value.
Return
Boolean true if key exists in the Map.

dup

Added in API level 30
abstract fun dup(): AudioMetadataMap

Returns a copy of the map. This is intended for safe conversion between a AudioMetadataReadMap interface and a AudioMetadataMap interface. Currently only simple objects are used for key values which means a shallow copy is sufficient.

Return
AudioMetadataMap a Map copied from the existing map. This value cannot be null.

get

Added in API level 30
abstract fun <T : Any!> get(key: AudioMetadata.Key<T>): T?

Returns the value associated with the key.

Parameters
key AudioMetadata.Key<T>: interface for requesting the value. This value cannot be null.
<T> type of value.
Return
T? returns the value of associated with key or null if it doesn't exist.

size

Added in API level 30
abstract fun size(): Int

Returns the number of elements in the map.

Return
Int Value is 0 or greater