public static int setPublic(int modifier, boolean b) {
        if (b) {
            return (modifier | PUBLIC) & (~PROTECTED & ~PRIVATE);
        }
        else {
            return modifier & ~PUBLIC;
        }
    }
public static int setPublic ( int modifier , boolean b ) { if ( b ) { return ( modifier | PUBLIC ) & ( ~ PROTECTED & ~ PRIVATE ) ; } else { return modifier & ~ PUBLIC ; } }
When set public, the modifier is cleared from being private or
protected.