Language

Collections.UnmodifiableSequencedCollection(ISequencedCollection) Method

Definition

Returns an unmodifiable view of the specified SequencedCollection.

[Android.Runtime.Register("unmodifiableSequencedCollection", "(Ljava/util/SequencedCollection;)Ljava/util/SequencedCollection;", "", ApiSince=35)]
[Java.Interop.JavaTypeParameters(new System.String[] { "T" })]
public static Java.Util.ISequencedCollection UnmodifiableSequencedCollection(Java.Util.ISequencedCollection c);
[<Android.Runtime.Register("unmodifiableSequencedCollection", "(Ljava/util/SequencedCollection;)Ljava/util/SequencedCollection;", "", ApiSince=35)>]
[<Java.Interop.JavaTypeParameters(new System.String[] { "T" })>]
static member UnmodifiableSequencedCollection : Java.Util.ISequencedCollection -> Java.Util.ISequencedCollection

Parameters

c
ISequencedCollection

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

Returns

an unmodifiable view of the specified collection.

Attributes

Remarks

Returns an unmodifiable view of the specified SequencedCollection. Query operations on the returned collection "read through" to the specified collection, and attempts to modify the returned collection, whether direct or via its iterator, result in an UnsupportedOperationException. The returned collection does not pass the hashCode and equals operations through to the backing collection, but relies on Object's equals and hashCode methods. This is necessary to preserve the contracts of these operations in the case that the backing collection is a set or a list. The returned collection will be serializable if the specified collection is serializable.

Java reference for java.util.Collections.unmodifiableSequencedCollection.

Applies to