Collections.UnmodifiableMap(IDictionary) Method
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.
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
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.
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.