of

inline fun <E : Enum<E>> of(e: E): EnumSet<E>

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.

Return

an enum set initially containing the specified element

Parameters

The class of the specified element and of the set
e

the element that this set is to contain initially

Throws


inline fun <E : Enum<E>> of(e1: E, e2: E): EnumSet<E>

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.

Return

an enum set initially containing the specified elements

Parameters

The class of the parameter elements and of the set
e1

an element that this set is to contain initially

e2

another element that this set is to contain initially

Throws

if any parameters are null


inline fun <E : Enum<E>> of(e1: E, e2: E, e3: E): EnumSet<E>

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.

Return

an enum set initially containing the specified elements

Parameters

The class of the parameter elements and of the set
e1

an element that this set is to contain initially

e2

another element that this set is to contain initially

e3

another element that this set is to contain initially

Throws

if any parameters are null


inline fun <E : Enum<E>> of(e1: E, e2: E, e3: E, e4: E): EnumSet<E>

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.

Return

an enum set initially containing the specified elements

Parameters

The class of the parameter elements and of the set
e1

an element that this set is to contain initially

e2

another element that this set is to contain initially

e3

another element that this set is to contain initially

e4

another element that this set is to contain initially

Throws

if any parameters are null


inline fun <E : Enum<E>> of(e1: E, e2: E, e3: E, e4: E, e5: E): EnumSet<E>

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.

Return

an enum set initially containing the specified elements

Parameters

The class of the parameter elements and of the set
e1

an element that this set is to contain initially

e2

another element that this set is to contain initially

e3

another element that this set is to contain initially

e4

another element that this set is to contain initially

e5

another element that this set is to contain initially

Throws

if any parameters are null


inline fun <E : Enum<E>> of(first: E, vararg rest: E): EnumSet<E>

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.

Return

an enum set initially containing the specified elements

Parameters

The class of the parameter elements and of the set
first

an element that the set is to contain initially

rest

the remaining elements the set is to contain initially

Throws

if any of the specified elements are null, or if rest is null