Stay organized with collections
Save and categorize content based on your preferences.
interface 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 |
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
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
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
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
abstract fun size(): Int
Returns the number of elements in the map.
Return |
Int |
Value is 0 or greater |
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-02-10 UTC.
[null,null,["Last updated 2025-02-10 UTC."],[],[],null,["# AudioMetadataReadMap\n\nAdded in [API level 30](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)\n\nAudioMetadataReadMap\n====================\n\n*** ** * ** ***\n\nKotlin \\|[Java](/reference/android/media/AudioMetadataReadMap \"View this page in Java\") \n\n```\ninterface AudioMetadataReadMap\n```\n\n|-----------------------------------------|\n| [android.media.AudioMetadataReadMap](#) |\n\n|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| Known Direct Subclasses [AudioMetadataMap](/reference/kotlin/android/media/AudioMetadataMap) |----------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------| | [AudioMetadataMap](/reference/kotlin/android/media/AudioMetadataMap) | AudioMetadataMap is a writeable `Map`-style interface of [AudioMetadata.Key](/reference/kotlin/android/media/AudioMetadata.Key) value pairs. | |\n\nA read only `Map`-style interface of [AudioMetadata.Key](/reference/kotlin/android/media/AudioMetadata.Key) value pairs used for [AudioMetadata](/reference/kotlin/android/media/AudioMetadata).\n\nUsing a [AudioMetadata.Key](/reference/kotlin/android/media/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.\n{@see AudioMetadataMap}\n\nSummary\n-------\n\n| Public methods ||\n|---------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| abstract [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html) | [containsKey](#containsKey(android.media.AudioMetadata.Key))`(`key:` `[AudioMetadata.Key](/reference/kotlin/android/media/AudioMetadata.Key)\u003cT\u003e`)` Returns true if the key exists in the map. |\n| abstract [AudioMetadataMap](/reference/kotlin/android/media/AudioMetadataMap) | [dup](#dup())`()` Returns a copy of the map. |\n| abstract T? | [get](#get(android.media.AudioMetadata.Key))`(`key:` `[AudioMetadata.Key](/reference/kotlin/android/media/AudioMetadata.Key)\u003cT\u003e`)` Returns the value associated with the key. |\n| abstract [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [size](#size())`()` Returns the number of elements in the map. |\n\nPublic methods\n--------------\n\n### containsKey\n\nAdded in [API level 30](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nabstract fun \u003cT : Any!\u003e containsKey(key: AudioMetadata.Key\u003cT\u003e): Boolean\n```\n\nReturns true if the key exists in the map.\n\n| Parameters ||\n|-------|-----------------------------------------------------------------------------------------------------------------------------------------------|\n| `key` | [AudioMetadata.Key](/reference/kotlin/android/media/AudioMetadata.Key)\\\u003cT\\\u003e: interface for requesting the value. This value cannot be `null`. |\n| `\u003cT\u003e` | type of value. |\n\n| Return ||\n|------------------------------------------------------------------------------------|--------------------------------|\n| [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html) | true if key exists in the Map. |\n\n### dup\n\nAdded in [API level 30](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nabstract fun dup(): AudioMetadataMap\n```\n\nReturns a copy of the map. This is intended for safe conversion between a [AudioMetadataReadMap](#) interface and a [AudioMetadataMap](/reference/kotlin/android/media/AudioMetadataMap) interface. Currently only simple objects are used for key values which means a shallow copy is sufficient.\n\n| Return ||\n|----------------------------------------------------------------------|------------------------------------------------------------------|\n| [AudioMetadataMap](/reference/kotlin/android/media/AudioMetadataMap) | a Map copied from the existing map. This value cannot be `null`. |\n\n### get\n\nAdded in [API level 30](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nabstract fun \u003cT : Any!\u003e get(key: AudioMetadata.Key\u003cT\u003e): T?\n```\n\nReturns the value associated with the key.\n\n| Parameters ||\n|-------|-----------------------------------------------------------------------------------------------------------------------------------------------|\n| `key` | [AudioMetadata.Key](/reference/kotlin/android/media/AudioMetadata.Key)\\\u003cT\\\u003e: interface for requesting the value. This value cannot be `null`. |\n| `\u003cT\u003e` | type of value. |\n\n| Return ||\n|----|-----------------------------------------------------------------------|\n| T? | returns the value of associated with key or null if it doesn't exist. |\n\n### size\n\nAdded in [API level 30](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nabstract fun size(): Int\n```\n\nReturns the number of elements in the map.\n\n| Return ||\n|----------------------------------------------------------------------------|-----------------------|\n| [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | Value is 0 or greater |"]]