I have a int variable which hold multiple flags, for instance:
int styles = ExpandableComposite.TITLE_BAR | ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED;
I can test the presence of a flag
boolean expanded = (styles & ExpandableComposite.EXPANDED) != 0;
How can I clear the value of a flag from styles, i.e. dynamically remove ExpandableComposite.EXPANDED, without knowing the exact flags which are set in styles?