Companion

object Companion

Throws InvalidObjectException.

Throws

InvalidObjectException

always

Functions

Link copied to clipboard
inline fun <E : Enum<E>> allOf(elementType: KClass<E>): EnumSet<E>

Creates an enum set containing all of the elements in the specified element type.

Link copied to clipboard
fun <E : Enum<E>> complementOf(s: EnumSet<E>): EnumSet<E>

Creates an enum set with the same element type as the specified enum set, initially containing all the elements of this type that are not contained in the specified set.

Link copied to clipboard
inline fun <E : Enum<E>> copyOf(c: MutableCollection<E>): EnumSet<E>

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. Otherwise, the specified collection must contain at least one element (in order to determine the new enum set's element type).

fun <E : Enum<E>> copyOf(s: EnumSet<E>): EnumSet<E>

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

Link copied to clipboard
inline fun <E : Enum<E>> getUniverse(elementType: KClass<out E>): Array<E>?

Returns all of the values comprising E. The result is uncloned, cached, and shared by all callers.

Link copied to clipboard
inline fun <E : Enum<E>> noneOf(elementType: KClass<out E>): EnumSet<E>

Creates an empty enum set with the specified element type.

Link copied to clipboard
inline fun <E : Enum<E>> of(e: E): EnumSet<E>

Creates an enum set initially containing the specified element.

inline fun <E : Enum<E>> of(e1: E, e2: E): EnumSet<E>
inline fun <E : Enum<E>> of(e1: E, e2: E, e3: E): EnumSet<E>
inline fun <E : Enum<E>> of(e1: E, e2: E, e3: E, e4: E): EnumSet<E>
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.

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.

Link copied to clipboard
inline fun <E : Enum<E>> range(from: E, to: E): EnumSet<E>

Creates an enum set initially containing all of the elements in the range defined by the two specified endpoints. The returned set will contain the endpoints themselves, which may be identical but must not be out of order.