For an APEX class with:
public class EuchreCard{
public enum suite {CLUBS, DIAMONDS, HEARTS, SPADES}
public enum rank {NINE, TEN, JACK, QUEEN, KING, ACE}
}
Is there a way to loop through all enum values? For instance, I want to create a euchre hand, so all I need to do is loop through both suite
and rank
to generate every possible combination.