Aracılığıyla paylaş


Collections.UnmodifiableSet(ICollection) Method

Definition

Returns an unmodifiable view of the specified set.

[Android.Runtime.Register("unmodifiableSet", "(Ljava/util/Set;)Ljava/util/Set;", "")]
[Java.Interop.JavaTypeParameters(new System.String[] { "T" })]
public static System.Collections.ICollection UnmodifiableSet (System.Collections.ICollection s);
[<Android.Runtime.Register("unmodifiableSet", "(Ljava/util/Set;)Ljava/util/Set;", "")>]
[<Java.Interop.JavaTypeParameters(new System.String[] { "T" })>]
static member UnmodifiableSet : System.Collections.ICollection -> System.Collections.ICollection

Parameters

s
ICollection

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

Returns

an unmodifiable view of the specified set.

Attributes

Remarks

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

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

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