Checks if the integer has a specific flag bit set.
flag
bool has(int flag) { return (this & flag) != 0; }