Share via


Collections.UnmodifiableList(IList) Method

Definition

Returns an unmodifiable view of the specified list.

[Android.Runtime.Register("unmodifiableList", "(Ljava/util/List;)Ljava/util/List;", "")]
[Java.Interop.JavaTypeParameters(new System.String[] { "T" })]
public static System.Collections.IList UnmodifiableList (System.Collections.IList list);
[<Android.Runtime.Register("unmodifiableList", "(Ljava/util/List;)Ljava/util/List;", "")>]
[<Java.Interop.JavaTypeParameters(new System.String[] { "T" })>]
static member UnmodifiableList : System.Collections.IList -> System.Collections.IList

Parameters

list
IList

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

Returns

an unmodifiable view of the specified list.

Attributes

Remarks

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

The returned list will be serializable if the specified list is serializable. Similarly, the returned list will implement RandomAccess if the specified list does.

Java documentation for java.util.Collections.unmodifiableList(java.util.List<? extends T>).

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