When I create an EnumSet and send it via a function, I find myself unable to reach the Enum values set inside the EnumSet. All I can do is compare it to the original set and check if it is present. I do not want that since that forces me to waste lines of code and forces me to reach out for the Original Enum class every single time.
for(Action a : Action.values())
{
if(stateCommands.contains(a))
{
System.out.println(a.getCommand() + a.getDescription());
}
}
I want to iterate through stateCommands and be able to see its content.
How should I proceed with this ?