HashMap Constructors

Definition

Overloads

HashMap()

Constructs an empty HashMap with the default initial capacity (16) and the default load factor (0.

HashMap(IDictionary)

Constructs a new HashMap with the same mappings as the specified Map.

HashMap(Int32)

Constructs an empty HashMap with the specified initial capacity and the default load factor (0.

HashMap(Int32, Single)

Constructs an empty HashMap with the specified initial capacity and load factor.

HashMap(IntPtr, JniHandleOwnership)

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

HashMap()

Constructs an empty HashMap with the default initial capacity (16) and the default load factor (0.

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

Remarks

Constructs an empty HashMap with the default initial capacity (16) and the default load factor (0.75).

Java documentation for java.util.HashMap.HashMap().

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

HashMap(IDictionary)

Constructs a new HashMap with the same mappings as the specified Map.

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

Parameters

m
IDictionary

the map whose mappings are to be placed in this map

Attributes

Remarks

Java documentation for java.util.HashMap.HashMap(java.util.Map<? extends K, ? 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

HashMap(Int32)

Constructs an empty HashMap with the specified initial capacity and the default load factor (0.

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

Parameters

initialCapacity
Int32

the initial capacity.

Attributes

Exceptions

when the capacity is less than zero.

Remarks

Constructs an empty HashMap with the specified initial capacity and the default load factor (0.75).

Java documentation for java.util.HashMap.HashMap(.*int).

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

HashMap(Int32, Single)

Constructs an empty HashMap with the specified initial capacity and load factor.

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

Parameters

initialCapacity
Int32

the initial capacity

loadFactor
Single

the load factor

Attributes

Exceptions

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

Remarks

Constructs an empty HashMap with the specified initial capacity and load factor.

Java documentation for java.util.HashMap.HashMap(.*int, .*float).

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

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

nativeint

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

transfer
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