question: @ Nonnull public static Set < Flag > parse ( @ Nonnegative final int bitmask ) { Check . notNegative ( bitmask , "bitmask" ) ; final Set < Flag > flags = new HashSet < Flag > ( ) ; for ( final Flag flag : values ( ) ) { if ( ( bitmask & flag . getNumber ( ) ) != 0 ) { flags . add ( flag ) ; } } return flags ; }
target:  Parses a sum of flags as numerical values (bitmask) and translates it to set of enum values.