public static <E extends Enum<E>>EnumSet<E> of(E e){
  EnumSet<E> result=noneOf(e.getDeclaringClass());
  result.add(e);
  return result;
}

public static < E extends Enum < E > > EnumSet < E > of ( E e ) { EnumSet < E > result = noneOf ( e . getDeclaringClass ( ) ) ; result . add ( e ) ; return result ; }
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 .
