Stay organized with collections
Save and categorize content based on your preferences.
interface AudioMetadataMap : AudioMetadataReadMap
AudioMetadataMap is a writeable Map
-style interface of AudioMetadata.Key
value pairs. This interface is not guaranteed to be thread-safe unless the underlying implementation for the AudioMetadataMap
states it as thread safe. {@see AudioMetadataReadMap}
Summary
Public methods |
abstract T? |
Removes the value associated with the key.
|
abstract T? |
Sets a value for the key.
|
Public methods
remove
abstract fun <T : Any!> remove(key: AudioMetadata.Key<T>): T?
Removes the value associated with the key.
Parameters |
key |
AudioMetadata.Key<T>: interface for storing the value. This value cannot be null . |
<T> |
type of value. |
Return |
T? |
the value of the key, null if it doesn't exist. |
set
abstract fun <T : Any!> set(
key: AudioMetadata.Key<T>,
value: T
): T?
Sets a value for the key.
Parameters |
key |
AudioMetadata.Key<T>: interface for storing the value. This value cannot be null . |
<T> |
type of value. |
value |
T: a non-null value of type T. |
Return |
T? |
the previous value associated with key or null if it doesn't exist. |
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.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-02-10 UTC."],[],[],null,["# AudioMetadataMap\n\nAdded in [API level 30](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)\n\nAudioMetadataMap\n================\n\n*** ** * ** ***\n\nKotlin \\|[Java](/reference/android/media/AudioMetadataMap \"View this page in Java\") \n\n```\ninterface AudioMetadataMap : AudioMetadataReadMap\n```\n\n|-------------------------------------|\n| [android.media.AudioMetadataMap](#) |\n\nAudioMetadataMap is a writeable `Map`-style interface of [AudioMetadata.Key](/reference/kotlin/android/media/AudioMetadata.Key) value pairs. This interface is not guaranteed to be thread-safe unless the underlying implementation for the `AudioMetadataMap` states it as thread safe. {@see AudioMetadataReadMap}\n\nSummary\n-------\n\n| Public methods ||\n|-------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| abstract T? | [remove](#remove(android.media.AudioMetadata.Key))`(`key:` `[AudioMetadata.Key](/reference/kotlin/android/media/AudioMetadata.Key)\u003cT\u003e`)` Removes the value associated with the key. |\n| abstract T? | [set](#set(android.media.AudioMetadata.Key,%20android.media.AudioMetadataMap.set.T))`(`key:` `[AudioMetadata.Key](/reference/kotlin/android/media/AudioMetadata.Key)\u003cT\u003e`, `value:` `T`)` Sets a value for the key. |\n\n| Inherited functions ||\n|---|---|\n| From class [AudioMetadataReadMap](/reference/kotlin/android/media/AudioMetadataReadMap) |------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html) | [containsKey](/reference/kotlin/android/media/AudioMetadataReadMap#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. \u003cbr /\u003e | | [AudioMetadataMap](#) | [dup](/reference/kotlin/android/media/AudioMetadataReadMap#dup())`()` Returns a copy of the map. This is intended for safe conversion between a [AudioMetadataReadMap](/reference/kotlin/android/media/AudioMetadataReadMap) interface and a [AudioMetadataMap](#) interface. Currently only simple objects are used for key values which means a shallow copy is sufficient. \u003cbr /\u003e | | T? | [get](/reference/kotlin/android/media/AudioMetadataReadMap#get(android.media.AudioMetadata.Key))`(`key:` `[AudioMetadata.Key](/reference/kotlin/android/media/AudioMetadata.Key)\u003cT\u003e`)` Returns the value associated with the key. \u003cbr /\u003e | | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [size](/reference/kotlin/android/media/AudioMetadataReadMap#size())`()` Returns the number of elements in the map. \u003cbr /\u003e | ||\n\nPublic methods\n--------------\n\n### remove\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 remove(key: AudioMetadata.Key\u003cT\u003e): T?\n```\n\nRemoves the value associated with the key.\n\n| Parameters ||\n|-------|--------------------------------------------------------------------------------------------------------------------------------------------|\n| `key` | [AudioMetadata.Key](/reference/kotlin/android/media/AudioMetadata.Key)\\\u003cT\\\u003e: interface for storing the value. This value cannot be `null`. |\n| `\u003cT\u003e` | type of value. |\n\n| Return ||\n|----|-------------------------------------------------|\n| T? | the value of the key, null if it doesn't exist. |\n\n### set\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 set(\n key: AudioMetadata.Key\u003cT\u003e, \n value: T\n): T?\n```\n\nSets a value for the key.\n\n| Parameters ||\n|---------|--------------------------------------------------------------------------------------------------------------------------------------------|\n| `key` | [AudioMetadata.Key](/reference/kotlin/android/media/AudioMetadata.Key)\\\u003cT\\\u003e: interface for storing the value. This value cannot be `null`. |\n| `\u003cT\u003e` | type of value. |\n| `value` | T: a non-null value of type T. |\n\n| Return ||\n|----|---------------------------------------------------------------------|\n| T? | the previous value associated with key or null if it doesn't exist. |"]]