Is there an efficient way to find all possible combinations between multiple enums in Java?
Consider the following three enums -
public enum EnumOne {
One ("One"),
OneMore ("OneMore");
}
public enum EnumTwo {
Two ("Two"),
}
public enum EnumThree {
Three ("Three"),
ThreeMore ("ThreeMore");
}
I would like the output to produce all possible combinations between these multiple enums i.e.
{EnumOne.One, EnumTwo.Two, EnumThree.Three},
{EnumOne.One, EnumTwo.Two, EnumThree.ThreeMore},
{EnumOne.OneMore, EnumTwo.Two, EnumThree.Three},
{EnumOne.OneMore, EnumTwo.Two, EnumThree.ThreeMore}
Hoping to find an effective way of handling it.
Thanks