how to iterate enums jacva code example
Example 1: iterate through an enum java
for (enumerator s : enumerator.values()) {
// do abc
}
Example 2: loop over all values in enum
var values = Enum.GetValues(typeof(Foos)).Cast<Foos>();
for (enumerator s : enumerator.values()) {
// do abc
}
var values = Enum.GetValues(typeof(Foos)).Cast<Foos>();