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

从中绘制元素的 a Collection ,必须为非 null

返回

包含 List 给定元素的 Collection

属性

注解

返回一个不可修改的列表,其中包含给定集合的元素,其迭代顺序。 给定的集合不得为 null,并且不能包含任何 null 元素。 如果随后修改给定的集合,则返回的列表将不会反映此类修改。

已在 10 中添加。

Java文档java.util.List.copyOf(java.util.Collection<? extends E>)

本页的某些部分是根据 创建和共享的工作进行的修改,并根据 许可证中所述的条款使用。

适用于