I would like to implement a method that returns one or a list of allowed Action defined as enum.
For example my method should be like this:
public enum getAllowedActions() {
return // (( 'something like' Actions.ACTION1 & Actions.ACTION2 ));
}
and then read the results in another position like:
if (getAllowedActions() == Actions.ACTION1) {
// do something...
}
with:
public class enum {
ACTION1, ACTION2;
}
Thanks.
Stefano.
Sounds like you’re just lookng for
EnumSet: