public interface AudioMetadataMap
implements AudioMetadataReadMap

android.media.AudioMetadataMap



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.

Summary

Public methods

abstract <T> T remove(Key<T> key)

Removes the value associated with the key.

abstract <T> T set(Key<T> key, T value)

Sets a value for the key.

Inherited methods

From interface android.media.AudioMetadataReadMap

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

remove

public abstract T remove (Key<T> key)

Removes the value associated with the key.

Parameters
key Key: interface for storing the value.
This value cannot be null.
Returns
T the value of the key, null if it doesn't exist.

set

public abstract T set (Key<T> key, 
                T value)

Sets a value for the key.

Parameters
key Key: interface for storing the value.
This value cannot be null.
value T: a non-null value of type T.
Returns
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 2026-02-13 UTC.