Most of the times an enumeration containing all elements is shown in a drop down in the user interface. We have a need to show only 2 out of 5 fields in the user interface. What would be an easier way to fetch this data, by somehow leveraging the same functions available for an enumeration.
enum Color {RED, GREEN, BLACK, BLUE, YELLOW};
We have a requirement to show only {RED, BLUE} in a certain user interface?
Sounds like a job for
EnumSet: