Adds a new flag setting with the specified values.
        Does no checking.
766427
def __add_flag (rule_or_module, variable_name, condition, values):
    
    assert isinstance(rule_or_module, basestring)
    assert isinstance(variable_name, basestring)
    assert is_iterable_typed(condition, property_set.PropertySet)
    assert is_iterable(values) and all(
        isinstance(v, (basestring, type(None))) for v in values)
    f = Flag(variable_name, values, condition, rule_or_module)

    # Grab the name of the module
    m = __re_first_segment.match (rule_or_module)
    assert m
    module = m.group(1)

    __module_flags.setdefault(module, []).append(f)
    __flags.setdefault(rule_or_module, []).append(f)
492907
public AceObjectFlags addFlag(final Flag flag) {
        if (!flags.contains(flag)) {
            flags.add(flag);
        }
        return this;
    }
24554
def set_value(self, value):
        
        if value:
            self.setChecked(Qt.Checked)
        else:
            self.setChecked(Qt.Unchecked)
112745
def setValue(self, key, value):
        
        if self._customFormat:
            self._customFormat.setValue(key, value)
        else:
            super(XSettings, self).setValue(key, wrapVariant(value))
380464
@Override
    public void setIsNew(boolean flag) {
        if (com.ibm.ejs.ras.TraceComponent.isAnyTracingEnabled() && LoggingUtil.SESSION_LOGGER_CORE.isLoggable(Level.FINE)) {
            StringBuffer sb = new StringBuffer(newValueString).append(flag).append(oldValueString).append(_isNew).append(appNameAndIdString);
            LoggingUtil.SESSION_LOGGER_CORE.logp(Level.FINE, methodClassName, "setIsNew", sb.toString());
        }
        _isNew = flag;
    }
353661
function setFlags() {
		flagN = !!( P & 0x80 );
		flagV = !!( P & 0x40 );
		flagB = !!( P & 0x10 );
		flagD = !!( P & 0x08 );
		flagI = !!( P & 0x04 );
		flagZ = !!( P & 0x02 );
		flagC = !!( P & 0x01 );
	}
671841
function add(values, value) {
  var self = this

  if (value) {
    self.map[values] = value
  } else {
    addAll(self.map, values)
  }

  return self
}
1005169
def set_total_count(self, value):
        """"""
        if not self.total_count_flag and value:
            self._count.append(int(value))
            self.total_count_flag = True
520012
public Message setFlag(Flag ... flags) {
        if(flags != null) {
            short tmp=this.flags;
            for(Flag flag : flags) {
                if(flag != null)
                    tmp|=flag.value();
            }
            this.flags=tmp;
        }
        return this;
    }
818148
public final void addValue(@NonNull final String value) {
        Condition.INSTANCE.ensureNotNull(value, "The value may not be null");

        if (this.values != null) {
            if (this.values.add(value)) {
                if (persistSet(this.values)) {
                    notifyChanged();
                }
            }
        } else {
            Set<String> newValues = new HashSet<>();
            newValues.add(value);
            setValues(newValues);
        }
    }
338543
def flags=(values)
      val = 0
      FRAME_FLAGS_MAP.values_at(*values).each { |c|
        val |= c if c
      }
      @flags_value = val
    end
1152524
public function setFlag($flag)
	{
		if ( $flag == $this->getFlag() ) { return; }

		$this->_values['flag'] = (int) $flag;
		$this->setModified();
	}
39514
void  addValToSets(List<RBBINode> sets, int val) {
        for (RBBINode usetNode : sets) {
            addValToSet(usetNode, val);
        }
    }
1145680
def set_flag(self, request, val, fld):
        """"""
        if val is not None:
            val = bool(val)
            request.set(fld, val)
787327
private void addFlagFileOption() {
        String name = "flagfile";
        String shortName = getAndAddUniqueShortName(name);
        String description = "Special flag: file from which to read additional flags"
                + " (lines starting with # are ignored as comments,"
                + " and these flags are always processed before those on the command line).";
        flagfileOpt = new Option(shortName, name, true, description);
        flagfileOpt.setRequired(false);
        options.addOption(flagfileOpt);
    }
1056377
def append_flag_values(self, flag_values):
    
    for flag_name, flag in six.iteritems(flag_values._flags()):  # pylint: disable=protected-access
      # Each flags with short_name appears here twice (once under its
      # normal name, and again with its short name).  To prevent
      # problems (DuplicateFlagError) with double flag registration, we
      # perform a check to make sure that the entry we're looking at is
      # for its normal name.
      if flag_name == flag.name:
        try:
          self[flag_name] = flag
        except _exceptions.DuplicateFlagError:
          raise _exceptions.DuplicateFlagError.from_flag(
              flag_name, self, other_flag_values=flag_values)
939832
private void setConfigFlag(int flag, boolean state)
    {
        if (state) {
            mConfigFlags |= flag;
        } else {
            mConfigFlags &= ~flag;
        }
        mConfigFlagMods |= flag;
    }