Added in API level 30

AudioMetadataReadMap


public 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 also:

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

containsKey

Added in API level 30
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

Added in API level 30
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.

get

Added in API level 30
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

Added in API level 30
public abstract int size ()

Returns the number of elements in the map.

Returns
int Value is 0 or greater