Aracılığıyla paylaş


Collections.UnmodifiableMap(IDictionary) Method

Definition

Returns an unmodifiable view of the specified map.

[Android.Runtime.Register("unmodifiableMap", "(Ljava/util/Map;)Ljava/util/Map;", "")]
[Java.Interop.JavaTypeParameters(new System.String[] { "K", "V" })]
public static System.Collections.IDictionary UnmodifiableMap (System.Collections.IDictionary m);
[<Android.Runtime.Register("unmodifiableMap", "(Ljava/util/Map;)Ljava/util/Map;", "")>]
[<Java.Interop.JavaTypeParameters(new System.String[] { "K", "V" })>]
static member UnmodifiableMap : System.Collections.IDictionary -> System.Collections.IDictionary

Parameters

m
IDictionary

the map for which an unmodifiable view is to be returned.

Returns

an unmodifiable view of the specified map.

Attributes

Remarks

Returns an unmodifiable view of the specified map. Query operations on the returned map "read through" to the specified map, and attempts to modify the returned map, whether direct or via its collection views, result in an UnsupportedOperationException.

The returned map will be serializable if the specified map is serializable.

Java documentation for java.util.Collections.unmodifiableMap(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