共用方式為


EnumSet.CopyOf Method

Definition

Overloads

CopyOf(EnumSet)

Creates an enum set with the same element type as the specified enum set, initially containing the same elements (if any).

CopyOf(ICollection)

Creates an enum set initialized from the specified collection.

CopyOf(EnumSet)

Creates an enum set with the same element type as the specified enum set, initially containing the same elements (if any).

[Android.Runtime.Register("copyOf", "(Ljava/util/EnumSet;)Ljava/util/EnumSet;", "")]
[Java.Interop.JavaTypeParameters(new System.String[] { "E extends java.lang.Enum<E>" })]
public static Java.Util.EnumSet? CopyOf (Java.Util.EnumSet? s);
[<Android.Runtime.Register("copyOf", "(Ljava/util/EnumSet;)Ljava/util/EnumSet;", "")>]
[<Java.Interop.JavaTypeParameters(new System.String[] { "E extends java.lang.Enum<E>" })>]
static member CopyOf : Java.Util.EnumSet -> Java.Util.EnumSet

Parameters

s
EnumSet

the enum set from which to initialize this enum set

Returns

A copy of the specified enum set.

Attributes

Remarks

Creates an enum set with the same element type as the specified enum set, initially containing the same elements (if any).

Java documentation for java.util.EnumSet.copyOf(java.util.EnumSet<E>).

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

CopyOf(ICollection)

Creates an enum set initialized from the specified collection.

[Android.Runtime.Register("copyOf", "(Ljava/util/Collection;)Ljava/util/EnumSet;", "")]
[Java.Interop.JavaTypeParameters(new System.String[] { "E extends java.lang.Enum<E>" })]
public static Java.Util.EnumSet? CopyOf (System.Collections.ICollection? c);
[<Android.Runtime.Register("copyOf", "(Ljava/util/Collection;)Ljava/util/EnumSet;", "")>]
[<Java.Interop.JavaTypeParameters(new System.String[] { "E extends java.lang.Enum<E>" })>]
static member CopyOf : System.Collections.ICollection -> Java.Util.EnumSet

Parameters

c
ICollection

the collection from which to initialize this enum set

Returns

An enum set initialized from the given collection.

Attributes

Remarks

Creates an enum set initialized from the specified collection. If the specified collection is an EnumSet instance, this static factory method behaves identically to #copyOf(EnumSet). Otherwise, the specified collection must contain at least one element (in order to determine the new enum set's element type).

Java documentation for java.util.EnumSet.copyOf(java.util.Collection<E>).

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