public static boolean checkFlagExclusiveSet ( int flags , int flag , int mask ) { int f = flags & flag ; if ( f != 0 ) { return ( ( flags & mask & ~ flag ) != 0 ) ? false : true ; } else { return false ; } }
Utility function to check if a particular flag is set exclusively given a particular set of flags and a mask