public static <E extends Enum<E>> EnumSet<E> copyOf (EnumSet<E> s)

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

Parameters:
s    the enum set from which to initialize this enum set

Exceptions:
NullPointerException    if s is null