Java Enums: Two enum types, each containing references to each other?
One of the best ways would be using the enum polymorphism technique: public class EnumTest { public enum Foo { A { @Override public Bar getBar() { return Bar.Alpha; } }, B { @Override public Bar getBar() { return Bar.Delta; } }, C { @Override public Bar getBar() { return Bar.Alpha; } }, ; public … Read more