public static < E extends Enum < E > > EnumSet < E > of ( E e1 , E e2 ) { EnumSet < E > result = noneOf ( e1 . getDeclaringClass ( ) ) ; result . add ( e1 ) ; result . add ( e2 ) ; return result ; }
Creates an enum set initially containing the specified elements .