EnumSet.Of Method

Definition

Overloads

Of(Object, Object, Object, Object, Object)

Creates an enum set initially containing the specified elements.

Of(Object, Object, Object, Object)

Creates an enum set initially containing the specified elements.

Of(Object, Object, Object)

Creates an enum set initially containing the specified elements.

Of(Object)

Creates an enum set initially containing the specified element.

Of(Object, Object)

Creates an enum set initially containing the specified elements.

Of(Object, Object[])

Creates an enum set initially containing the specified elements.

Of(Object, Object, Object, Object, Object)

Creates an enum set initially containing the specified elements.

[Android.Runtime.Register("of", "(Ljava/lang/Enum;Ljava/lang/Enum;Ljava/lang/Enum;Ljava/lang/Enum;Ljava/lang/Enum;)Ljava/util/EnumSet;", "")]
[Java.Interop.JavaTypeParameters(new System.String[] { "E extends java.lang.Enum<E>" })]
public static Java.Util.EnumSet? Of (Java.Lang.Object? e1, Java.Lang.Object? e2, Java.Lang.Object? e3, Java.Lang.Object? e4, Java.Lang.Object? e5);
[<Android.Runtime.Register("of", "(Ljava/lang/Enum;Ljava/lang/Enum;Ljava/lang/Enum;Ljava/lang/Enum;Ljava/lang/Enum;)Ljava/util/EnumSet;", "")>]
[<Java.Interop.JavaTypeParameters(new System.String[] { "E extends java.lang.Enum<E>" })>]
static member Of : Java.Lang.Object * Java.Lang.Object * Java.Lang.Object * Java.Lang.Object * Java.Lang.Object -> Java.Util.EnumSet

Parameters

e1
Object

an element that this set is to contain initially

e2
Object

another element that this set is to contain initially

e3
Object

another element that this set is to contain initially

e4
Object

another element that this set is to contain initially

e5
Object

another element that this set is to contain initially

Returns

an enum set initially containing the specified elements

Attributes

Remarks

Creates an enum set initially containing the specified elements.

Overloadings of this method exist to initialize an enum set with one through five elements. A sixth overloading is provided that uses the varargs feature. This overloading may be used to create an enum set initially containing an arbitrary number of elements, but is likely to run slower than the overloadings that do not use varargs.

Java documentation for java.util.EnumSet.of(E, E, E, E, 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

Of(Object, Object, Object, Object)

Creates an enum set initially containing the specified elements.

[Android.Runtime.Register("of", "(Ljava/lang/Enum;Ljava/lang/Enum;Ljava/lang/Enum;Ljava/lang/Enum;)Ljava/util/EnumSet;", "")]
[Java.Interop.JavaTypeParameters(new System.String[] { "E extends java.lang.Enum<E>" })]
public static Java.Util.EnumSet? Of (Java.Lang.Object? e1, Java.Lang.Object? e2, Java.Lang.Object? e3, Java.Lang.Object? e4);
[<Android.Runtime.Register("of", "(Ljava/lang/Enum;Ljava/lang/Enum;Ljava/lang/Enum;Ljava/lang/Enum;)Ljava/util/EnumSet;", "")>]
[<Java.Interop.JavaTypeParameters(new System.String[] { "E extends java.lang.Enum<E>" })>]
static member Of : Java.Lang.Object * Java.Lang.Object * Java.Lang.Object * Java.Lang.Object -> Java.Util.EnumSet

Parameters

e1
Object

an element that this set is to contain initially

e2
Object

another element that this set is to contain initially

e3
Object

another element that this set is to contain initially

e4
Object

another element that this set is to contain initially

Returns

an enum set initially containing the specified elements

Attributes

Remarks

Creates an enum set initially containing the specified elements.

Overloadings of this method exist to initialize an enum set with one through five elements. A sixth overloading is provided that uses the varargs feature. This overloading may be used to create an enum set initially containing an arbitrary number of elements, but is likely to run slower than the overloadings that do not use varargs.

Java documentation for java.util.EnumSet.of(E, E, E, 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

Of(Object, Object, Object)

Creates an enum set initially containing the specified elements.

[Android.Runtime.Register("of", "(Ljava/lang/Enum;Ljava/lang/Enum;Ljava/lang/Enum;)Ljava/util/EnumSet;", "")]
[Java.Interop.JavaTypeParameters(new System.String[] { "E extends java.lang.Enum<E>" })]
public static Java.Util.EnumSet? Of (Java.Lang.Object? e1, Java.Lang.Object? e2, Java.Lang.Object? e3);
[<Android.Runtime.Register("of", "(Ljava/lang/Enum;Ljava/lang/Enum;Ljava/lang/Enum;)Ljava/util/EnumSet;", "")>]
[<Java.Interop.JavaTypeParameters(new System.String[] { "E extends java.lang.Enum<E>" })>]
static member Of : Java.Lang.Object * Java.Lang.Object * Java.Lang.Object -> Java.Util.EnumSet

Parameters

e1
Object

an element that this set is to contain initially

e2
Object

another element that this set is to contain initially

e3
Object

another element that this set is to contain initially

Returns

an enum set initially containing the specified elements

Attributes

Remarks

Creates an enum set initially containing the specified elements.

Overloadings of this method exist to initialize an enum set with one through five elements. A sixth overloading is provided that uses the varargs feature. This overloading may be used to create an enum set initially containing an arbitrary number of elements, but is likely to run slower than the overloadings that do not use varargs.

Java documentation for java.util.EnumSet.of(E, E, 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

Of(Object)

Creates an enum set initially containing the specified element.

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

Parameters

e
Object

the element that this set is to contain initially

Returns

an enum set initially containing the specified element

Attributes

Remarks

Creates an enum set initially containing the specified element.

Overloadings of this method exist to initialize an enum set with one through five elements. A sixth overloading is provided that uses the varargs feature. This overloading may be used to create an enum set initially containing an arbitrary number of elements, but is likely to run slower than the overloadings that do not use varargs.

Java documentation for java.util.EnumSet.of(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

Of(Object, Object)

Creates an enum set initially containing the specified elements.

[Android.Runtime.Register("of", "(Ljava/lang/Enum;Ljava/lang/Enum;)Ljava/util/EnumSet;", "")]
[Java.Interop.JavaTypeParameters(new System.String[] { "E extends java.lang.Enum<E>" })]
public static Java.Util.EnumSet? Of (Java.Lang.Object? e1, Java.Lang.Object? e2);
[<Android.Runtime.Register("of", "(Ljava/lang/Enum;Ljava/lang/Enum;)Ljava/util/EnumSet;", "")>]
[<Java.Interop.JavaTypeParameters(new System.String[] { "E extends java.lang.Enum<E>" })>]
static member Of : Java.Lang.Object * Java.Lang.Object -> Java.Util.EnumSet

Parameters

e1
Object

an element that this set is to contain initially

e2
Object

another element that this set is to contain initially

Returns

an enum set initially containing the specified elements

Attributes

Remarks

Creates an enum set initially containing the specified elements.

Overloadings of this method exist to initialize an enum set with one through five elements. A sixth overloading is provided that uses the varargs feature. This overloading may be used to create an enum set initially containing an arbitrary number of elements, but is likely to run slower than the overloadings that do not use varargs.

Java documentation for java.util.EnumSet.of(E, 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

Of(Object, Object[])

Creates an enum set initially containing the specified elements.

[Android.Runtime.Register("of", "(Ljava/lang/Enum;[Ljava/lang/Enum;)Ljava/util/EnumSet;", "")]
[Java.Interop.JavaTypeParameters(new System.String[] { "E extends java.lang.Enum<E>" })]
public static Java.Util.EnumSet? Of (Java.Lang.Object? first, params Java.Lang.Object[]? rest);
[<Android.Runtime.Register("of", "(Ljava/lang/Enum;[Ljava/lang/Enum;)Ljava/util/EnumSet;", "")>]
[<Java.Interop.JavaTypeParameters(new System.String[] { "E extends java.lang.Enum<E>" })>]
static member Of : Java.Lang.Object * Java.Lang.Object[] -> Java.Util.EnumSet

Parameters

first
Object

an element that the set is to contain initially

rest
Object[]

the remaining elements the set is to contain initially

Returns

an enum set initially containing the specified elements

Attributes

Remarks

Creates an enum set initially containing the specified elements. This factory, whose parameter list uses the varargs feature, may be used to create an enum set initially containing an arbitrary number of elements, but it is likely to run slower than the overloadings that do not use varargs.

Java documentation for java.util.EnumSet.of(E, 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