HashMap HashMap Constructors

Definition

Overloads

HashMap()

Constructs a new empty HashMap instance.

HashMap(IDictionary) HashMap(IDictionary)
HashMap(Int32) HashMap(Int32)

Constructs a new HashMap instance with the specified capacity.

HashMap(Int32, Single) HashMap(Int32, Single)

Constructs a new HashMap instance with the specified capacity and load factor.

HashMap(IntPtr, JniHandleOwnership) HashMap(IntPtr, JniHandleOwnership)

A constructor used when creating managed representations of JNI objects; called by the runtime.

HashMap()

Constructs a new empty HashMap instance.

[Android.Runtime.Register(".ctor", "()V", "")]
public HashMap ();

Remarks

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.

HashMap(IDictionary) HashMap(IDictionary)

[Android.Runtime.Register(".ctor", "(Ljava/util/Map;)V", "")]
public HashMap (System.Collections.IDictionary m);
new Java.Util.HashMap : System.Collections.IDictionary -> Java.Util.HashMap

Parameters

Remarks

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.

HashMap(Int32) HashMap(Int32)

Constructs a new HashMap instance with the specified capacity.

[Android.Runtime.Register(".ctor", "(I)V", "")]
public HashMap (int initialCapacity);
new Java.Util.HashMap : int -> Java.Util.HashMap

Parameters

initialCapacity
Int32 Int32

Exceptions

when the capacity is less than zero.

Remarks

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.

HashMap(Int32, Single) HashMap(Int32, Single)

Constructs a new HashMap instance with the specified capacity and load factor.

[Android.Runtime.Register(".ctor", "(IF)V", "")]
public HashMap (int initialCapacity, float loadFactor);
new Java.Util.HashMap : int * single -> Java.Util.HashMap

Parameters

initialCapacity
Int32 Int32
loadFactor
Single Single

Exceptions

when the capacity is less than zero or the load factor is less or equal to zero or NaN.

Remarks

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.

HashMap(IntPtr, JniHandleOwnership) HashMap(IntPtr, JniHandleOwnership)

A constructor used when creating managed representations of JNI objects; called by the runtime.

protected HashMap (IntPtr javaReference, Android.Runtime.JniHandleOwnership transfer);
new Java.Util.HashMap : nativeint * Android.Runtime.JniHandleOwnership -> Java.Util.HashMap

Parameters

javaReference
IntPtr IntPtr

A IntPtrcontaining a Java Native Interface (JNI) object reference.

transfer
JniHandleOwnership JniHandleOwnership

A JniHandleOwnershipindicating how to handle javaReference

Remarks

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