Condividi tramite


Parcel.ReadHashMap Method

Definition

Overloads

ReadHashMap(ClassLoader)

Please use #readBundle(ClassLoader) instead (whose data must have been written with #writeBundle.

ReadHashMap(ClassLoader, Class, Class)

Same as #readHashMap(ClassLoader) but accepts clazzKey and clazzValue parameter as the types required for each key and value pair.

ReadHashMap(ClassLoader)

Please use #readBundle(ClassLoader) instead (whose data must have been written with #writeBundle.

[Android.Runtime.Register("readHashMap", "(Ljava/lang/ClassLoader;)Ljava/util/HashMap;", "")]
public System.Collections.IDictionary? ReadHashMap (Java.Lang.ClassLoader? loader);
[<Android.Runtime.Register("readHashMap", "(Ljava/lang/ClassLoader;)Ljava/util/HashMap;", "")>]
member this.ReadHashMap : Java.Lang.ClassLoader -> System.Collections.IDictionary

Parameters

loader
ClassLoader

Returns

Attributes

Remarks

Please use #readBundle(ClassLoader) instead (whose data must have been written with #writeBundle. Read and return a new HashMap object from the parcel at the current dataPosition(), using the given class loader to load any enclosed Parcelables. Returns null if the previously written map object was null.

This member is deprecated. Consider using #readBundle(ClassLoader) as stated above, in case this method is still preferred use the type-safer version #readHashMap(ClassLoader, Class, Class) starting from Android Build.VERSION_CODES#TIRAMISU.

Java documentation for android.os.Parcel.readHashMap(java.lang.ClassLoader).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to

ReadHashMap(ClassLoader, Class, Class)

Same as #readHashMap(ClassLoader) but accepts clazzKey and clazzValue parameter as the types required for each key and value pair.

[Android.Runtime.Register("readHashMap", "(Ljava/lang/ClassLoader;Ljava/lang/Class;Ljava/lang/Class;)Ljava/util/HashMap;", "", ApiSince=33)]
[Java.Interop.JavaTypeParameters(new System.String[] { "K", "V" })]
public System.Collections.IDictionary? ReadHashMap (Java.Lang.ClassLoader? loader, Java.Lang.Class clazzKey, Java.Lang.Class clazzValue);
[<Android.Runtime.Register("readHashMap", "(Ljava/lang/ClassLoader;Ljava/lang/Class;Ljava/lang/Class;)Ljava/util/HashMap;", "", ApiSince=33)>]
[<Java.Interop.JavaTypeParameters(new System.String[] { "K", "V" })>]
member this.ReadHashMap : Java.Lang.ClassLoader * Java.Lang.Class * Java.Lang.Class -> System.Collections.IDictionary

Parameters

loader
ClassLoader
clazzKey
Class
clazzValue
Class

Returns

Attributes

Remarks

Same as #readHashMap(ClassLoader) but accepts clazzKey and clazzValue parameter as the types required for each key and value pair.

Java documentation for android.os.Parcel.readHashMap(java.lang.ClassLoader, java.lang.Class<? extends K>, java.lang.Class<? extends V>).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to