How do I make this if-else block accept the enum types in Java?

Printable View