How do you iterate through an enumeration in Java? I tried the way I would expect from working with C++:
for( int ix = 1; ix < MyEnum.LastEnum; ix++)
{
// Do something here
}
I get the error "Cannot cast MyEnum to Int." Isn't an enumeration always a constant integral type? If not, how can I iterate through enumerations?