ConcurrentHashMap Constructors
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
ConcurrentHashMap() |
Creates a new, empty map with the default initial table size (16). |
ConcurrentHashMap(IDictionary) |
Creates a new map with the same mappings as the given map. |
ConcurrentHashMap(Int32) |
Creates a new, empty map with an initial table size accommodating the specified number of elements without the need to dynamically resize. |
ConcurrentHashMap(Int32, Single) |
Creates a new, empty map with an initial table size based on
the given number of elements ( |
ConcurrentHashMap(IntPtr, JniHandleOwnership) |
A constructor used when creating managed representations of JNI objects; called by the runtime. |
ConcurrentHashMap(Int32, Single, Int32) |
Creates a new, empty map with an initial table size based on
the given number of elements ( |
ConcurrentHashMap()
Creates a new, empty map with the default initial table size (16).
[Android.Runtime.Register(".ctor", "()V", "")]
public ConcurrentHashMap ();
- Attributes
Remarks
Creates a new, empty map with the default initial table size (16).
Java documentation for java.util.concurrent.ConcurrentHashMap.ConcurrentHashMap()
.
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
ConcurrentHashMap(IDictionary)
Creates a new map with the same mappings as the given map.
[Android.Runtime.Register(".ctor", "(Ljava/util/Map;)V", "")]
public ConcurrentHashMap (System.Collections.IDictionary m);
[<Android.Runtime.Register(".ctor", "(Ljava/util/Map;)V", "")>]
new Java.Util.Concurrent.ConcurrentHashMap : System.Collections.IDictionary -> Java.Util.Concurrent.ConcurrentHashMap
Parameters
the map
- Attributes
Remarks
Creates a new map with the same mappings as the given map.
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
ConcurrentHashMap(Int32)
Creates a new, empty map with an initial table size accommodating the specified number of elements without the need to dynamically resize.
[Android.Runtime.Register(".ctor", "(I)V", "")]
public ConcurrentHashMap (int initialCapacity);
[<Android.Runtime.Register(".ctor", "(I)V", "")>]
new Java.Util.Concurrent.ConcurrentHashMap : int -> Java.Util.Concurrent.ConcurrentHashMap
Parameters
- initialCapacity
- Int32
The implementation performs internal sizing to accommodate this many elements.
- Attributes
Exceptions
if the initial capacity of elements is negative
Remarks
Creates a new, empty map with an initial table size accommodating the specified number of elements without the need to dynamically resize.
Java documentation for java.util.concurrent.ConcurrentHashMap.ConcurrentHashMap(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
ConcurrentHashMap(Int32, Single)
Creates a new, empty map with an initial table size based on
the given number of elements (initialCapacity
) and
initial table density (loadFactor
).
[Android.Runtime.Register(".ctor", "(IF)V", "")]
public ConcurrentHashMap (int initialCapacity, float loadFactor);
[<Android.Runtime.Register(".ctor", "(IF)V", "")>]
new Java.Util.Concurrent.ConcurrentHashMap : int * single -> Java.Util.Concurrent.ConcurrentHashMap
Parameters
- initialCapacity
- Int32
the initial capacity. The implementation performs internal sizing to accommodate this many elements, given the specified load factor.
- loadFactor
- Single
the load factor (table density) for establishing the initial table size
- Attributes
Exceptions
if the initial capacity of elements is negative or the load factor is nonpositive
Remarks
Creates a new, empty map with an initial table size based on the given number of elements (initialCapacity
) and initial table density (loadFactor
).
Added in 1.6.
Java documentation for java.util.concurrent.ConcurrentHashMap.ConcurrentHashMap(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
ConcurrentHashMap(IntPtr, JniHandleOwnership)
A constructor used when creating managed representations of JNI objects; called by the runtime.
protected ConcurrentHashMap (IntPtr javaReference, Android.Runtime.JniHandleOwnership transfer);
new Java.Util.Concurrent.ConcurrentHashMap : nativeint * Android.Runtime.JniHandleOwnership -> Java.Util.Concurrent.ConcurrentHashMap
Parameters
- 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
ConcurrentHashMap(Int32, Single, Int32)
Creates a new, empty map with an initial table size based on
the given number of elements (initialCapacity
), initial
table density (loadFactor
), and number of concurrently
updating threads (concurrencyLevel
).
[Android.Runtime.Register(".ctor", "(IFI)V", "")]
public ConcurrentHashMap (int initialCapacity, float loadFactor, int concurrencyLevel);
[<Android.Runtime.Register(".ctor", "(IFI)V", "")>]
new Java.Util.Concurrent.ConcurrentHashMap : int * single * int -> Java.Util.Concurrent.ConcurrentHashMap
Parameters
- initialCapacity
- Int32
the initial capacity. The implementation performs internal sizing to accommodate this many elements, given the specified load factor.
- loadFactor
- Single
the load factor (table density) for establishing the initial table size
- concurrencyLevel
- Int32
the estimated number of concurrently updating threads. The implementation may use this value as a sizing hint.
- Attributes
Exceptions
if the initial capacity is negative or the load factor or concurrencyLevel are nonpositive
Remarks
Creates a new, empty map with an initial table size based on the given number of elements (initialCapacity
), initial table density (loadFactor
), and number of concurrently updating threads (concurrencyLevel
).
Java documentation for java.util.concurrent.ConcurrentHashMap.ConcurrentHashMap(int, float, 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.