If you leave the general EnumSet set, do the following: NOT :
public void StateLoop(EnumSet stateCommands){
However, if a type is provided for EnumSet, it will work fine:
public void StateLoop(EnumSet<StateCommand> stateCommands){ for(StateCommand command : stateCommands) {
source share