共用方式為


Set.CopyOf(ICollection) 方法

定義

警告

Use 'Java.Util.ISet.CopyOf'. This class will be removed in a future release.

傳回包含指定集合專案的不可修改集合。

[Android.Runtime.Register("copyOf", "(Ljava/util/Collection;)Ljava/util/Set;", "", ApiSince=31)]
[Java.Interop.JavaTypeParameters(new System.String[] { "E" })]
[System.Obsolete("Use 'Java.Util.ISet.CopyOf'. This class will be removed in a future release.")]
public static System.Collections.ICollection CopyOf (System.Collections.ICollection coll);
[<Android.Runtime.Register("copyOf", "(Ljava/util/Collection;)Ljava/util/Set;", "", ApiSince=31)>]
[<Java.Interop.JavaTypeParameters(new System.String[] { "E" })>]
[<System.Obsolete("Use 'Java.Util.ISet.CopyOf'. This class will be removed in a future release.")>]
static member CopyOf : System.Collections.ICollection -> System.Collections.ICollection

參數

coll
ICollection

Collection,要從中繪製元素,必須是非 Null

傳回

Set,包含指定之 專案的Collection

屬性

備註

傳回包含指定集合專案的不可修改集合。 指定的集合不得為 Null,而且不能包含任何 Null 元素。 如果指定的集合包含重複的專案,則會保留重複專案的任意專案。 如果後續修改指定的集合,傳回的 Set 將不會反映這類修改。

已在10中新增。

java.util.Set.copyOf(java.util.Collection<? extends E>)Java 檔。

此頁面的部分是根據 Android 開放原始碼專案所建立和共用的工作進行修改,並根據 Creative Commons 2.5 屬性授權中所述的詞彙使用。

適用於