語言

List.CopyOf(ICollection) 方法

定義

警告

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

回傳一個不可修改的清單,包含給定集合的元素,並依其迭代順序排列。

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

參數

coll
ICollection

Collection從 A 中抽取元素,必須是非零

傳回

包含給定元素的 a ListCollection

屬性

備註

回傳一個不可修改的清單,包含給定集合的元素,並依其迭代順序排列。 給定的集合不得為空,且不得包含任何空元素。 若該集合後續被修改,回傳的清單將不會反映這些修改。

加了10。

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

本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。

適用於