code: @Override
      public void setFlag(int mask, boolean value) {
          // set/unset a bit in the flags value
          if (value)
              flags |= mask;
          else
              flags &= ~(mask);
          notifyChanged();
      }
docs: {@inheritDoc}