code: public int change( final int    add,
                         final int    remove )
      {
          for (;;)
          {
              int    current = _flags.get();
              int    newValue = ( current | add ) & ~remove;
  
              if ( _flags.compareAndSet( current, newValue ) )
              {
                  return current;
              }
          }
      }
docs: Atomically add and remove the given flags from the current set
  
  @param add the flags to add
  @param remove the flags to remove
  @return the previous value