Stay organized with collections
Save and categorize content based on your preferences.
public
interface
AudioMetadataReadMap
android.media.AudioMetadataReadMap
|
Known indirect subclasses
|
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.
Summary
Public methods |
abstract
<T>
boolean
|
containsKey(Key<T> key)
Returns true if the key exists in the map.
|
abstract
AudioMetadataMap
|
dup()
Returns a copy of the map.
|
abstract
<T>
T
|
get(Key<T> key)
Returns the value associated with the key.
|
abstract
int
|
size()
Returns the number of elements in the map.
|
Public methods
public abstract boolean containsKey (Key<T> key)
Returns true if the key exists in the map.
Parameters |
key |
Key : interface for requesting the value.
This value cannot be null . |
Returns |
boolean |
true if key exists in the Map. |
dup
public abstract AudioMetadataMap dup ()
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.
Returns |
AudioMetadataMap |
a Map copied from the existing map.
This value cannot be null . |
public abstract T get (Key<T> key)
Returns the value associated with the key.
Parameters |
key |
Key : interface for requesting the value.
This value cannot be null . |
Returns |
T |
returns the value of associated with key or null if it doesn't exist. |
size
public abstract int size ()
Returns the number of elements in the map.
Returns |
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](/guide/topics/manifest/uses-sdk-element#ApiLevels) \nSummary: [Methods](#pubmethods) \n\nAudioMetadataReadMap\n====================\n\n*** ** * ** ***\n\n[Kotlin](/reference/kotlin/android/media/AudioMetadataReadMap \"View this page in Kotlin\") \\|Java\n\n\n`\npublic\n\n\ninterface\nAudioMetadataReadMap\n`\n\n\n`\n\n\n`\n\n|------------------------------------|\n| android.media.AudioMetadataReadMap |\n\n|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| Known indirect subclasses [AudioMetadataMap](/reference/android/media/AudioMetadataMap) |---------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------| | [AudioMetadataMap](/reference/android/media/AudioMetadataMap) | AudioMetadataMap is a writeable `Map`-style interface of [AudioMetadata.Key](/reference/android/media/AudioMetadata.Key) value pairs. | |\n\n\u003cbr /\u003e\n\n*** ** * ** ***\n\nA read only `Map`-style interface of [AudioMetadata.Key](/reference/android/media/AudioMetadata.Key) value pairs used\nfor [AudioMetadata](/reference/android/media/AudioMetadata).\n\nUsing a [AudioMetadata.Key](/reference/android/media/AudioMetadata.Key) interface,\nthis map looks up the corresponding value.\nRead-only maps are thread-safe for lookup, but the underlying object\nvalues may need their own thread protection if mutable.\n\n\u003cbr /\u003e\n\n**See also:**\n\n- [AudioMetadataMap](/reference/android/media/AudioMetadataMap)\n\nSummary\n-------\n\n| ### Public methods ||\n|---------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ` abstract \u003cT\u003e boolean` | ` `[containsKey](/reference/android/media/AudioMetadataReadMap#containsKey(android.media.AudioMetadata.Key\u003cT\u003e))`(`[Key](/reference/android/media/AudioMetadata.Key)`\u003cT\u003e key) ` Returns true if the key exists in the map. |\n| ` abstract `[AudioMetadataMap](/reference/android/media/AudioMetadataMap) | ` `[dup](/reference/android/media/AudioMetadataReadMap#dup())`() ` Returns a copy of the map. |\n| ` abstract \u003cT\u003e T` | ` `[get](/reference/android/media/AudioMetadataReadMap#get(android.media.AudioMetadata.Key\u003cT\u003e))`(`[Key](/reference/android/media/AudioMetadata.Key)`\u003cT\u003e key) ` Returns the value associated with the key. |\n| ` abstract int` | ` `[size](/reference/android/media/AudioMetadataReadMap#size())`() ` Returns the number of elements in the map. |\n\nPublic methods\n--------------\n\n### containsKey\n\nAdded in [API level 30](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\n```\npublic abstract boolean containsKey (Key\u003cT\u003e key)\n```\n\nReturns true if the key exists in the map.\n\n\u003cbr /\u003e\n\n| Parameters ||\n|-------|--------------------------------------------------------------------------------|\n| `key` | `Key`: interface for requesting the value. This value cannot be `null`. \u003cbr /\u003e |\n\n| Returns ||\n|-----------|---------------------------------------|\n| `boolean` | true if key exists in the Map. \u003cbr /\u003e |\n\n### dup\n\nAdded in [API level 30](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\n```\npublic abstract AudioMetadataMap dup ()\n```\n\nReturns a copy of the map.\n\nThis is intended for safe conversion between a [AudioMetadataReadMap](/reference/android/media/AudioMetadataReadMap)\ninterface and a [AudioMetadataMap](/reference/android/media/AudioMetadataMap) interface.\nCurrently only simple objects are used for key values which\nmeans a shallow copy is sufficient.\n\n\u003cbr /\u003e\n\n| Returns ||\n|---------------------------------------------------------------|-------------------------------------------------------------------------|\n| [AudioMetadataMap](/reference/android/media/AudioMetadataMap) | a Map copied from the existing map. This value cannot be `null`. \u003cbr /\u003e |\n\n### get\n\nAdded in [API level 30](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\n```\npublic abstract T get (Key\u003cT\u003e key)\n```\n\nReturns the value associated with the key.\n\n\u003cbr /\u003e\n\n| Parameters ||\n|-------|--------------------------------------------------------------------------------|\n| `key` | `Key`: interface for requesting the value. This value cannot be `null`. \u003cbr /\u003e |\n\n| Returns ||\n|-----|------------------------------------------------------------------------------|\n| `T` | returns the value of associated with key or null if it doesn't exist. \u003cbr /\u003e |\n\n### size\n\nAdded in [API level 30](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\n```\npublic abstract int size ()\n```\n\nReturns the number of elements in the map.\n\n\u003cbr /\u003e\n\n| Returns ||\n|-------|------------------------------|\n| `int` | Value is 0 or greater \u003cbr /\u003e |"]]