Partager via


Collections.UnmodifiableSortedSet(ISortedSet) Method

Definition

Returns an unmodifiable view of the specified sorted set.

[Android.Runtime.Register("unmodifiableSortedSet", "(Ljava/util/SortedSet;)Ljava/util/SortedSet;", "")]
[Java.Interop.JavaTypeParameters(new System.String[] { "T" })]
public static Java.Util.ISortedSet UnmodifiableSortedSet (Java.Util.ISortedSet s);
[<Android.Runtime.Register("unmodifiableSortedSet", "(Ljava/util/SortedSet;)Ljava/util/SortedSet;", "")>]
[<Java.Interop.JavaTypeParameters(new System.String[] { "T" })>]
static member UnmodifiableSortedSet : Java.Util.ISortedSet -> Java.Util.ISortedSet

Parameters

s
ISortedSet

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

Returns

an unmodifiable view of the specified sorted set.

Attributes

Remarks

Returns an unmodifiable view of the specified sorted set. Query operations on the returned sorted set "read through" to the specified sorted set. Attempts to modify the returned sorted set, whether direct, via its iterator, or via its subSet, headSet, or tailSet views, result in an UnsupportedOperationException.

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

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