Adds an option and its value to the class as an attribute and stores it
        to the used options set.
774620
def add_option(self, **options):
        
        for option, value in options.items():
            setattr(self, option, value)
            self._store_option(option)
736959
public function addOption($option)
    {
        $options = $this->getOptions();
        array_push($options, $option);
        $this->setOptions($options);
    }
1289505
public void addAttribute(String name, String value) {
        checkType(name, String.class);
        attributes.put(name, value);
    }
18061
protected void addOption(AbstractRenderAppender buffer, String type, String optionValue,
                             String optionDisplay, int idx, String altText, char accessKey, boolean disabled)
            throws JspException
    {
        ServletRequest req = pageContext.getRequest();
        if (_cr == null)
            _cr = TagRenderingBase.Factory.getConstantRendering(req);

        assert(buffer != null);
        assert(optionValue != null);
        assert(optionDisplay != null);
        assert(type != null);

        if (_orientation != null && isVertical()) {
            _cr.TR_TD(buffer);
        }

        _inputState.clear();
        _inputState.type = type;
        _inputState.name = getQualifiedDataSourceName();
        _inputState.value = optionValue;
        _inputState.style = _style;
        _inputState.styleClass = _class;

        if (isMatched(optionValue, null)) {
            _inputState.checked = true;
        }
        _inputState.disabled = isDisabled();
        _inputState.registerAttribute(AbstractHtmlState.ATTR_GENERAL, ALT, altText);
        if (accessKey != 0x00)
            _inputState.registerAttribute(AbstractHtmlState.ATTR_GENERAL, ACCESSKEY, Character.toString(accessKey));

        // if there are attributes defined push them to the options.
        if (_attrs != null && _attrs.size() > 0) {
            Iterator iterator = _attrs.keySet().iterator();
            for (; iterator.hasNext();) {
                String key = (String) iterator.next();
                if (key == null)
                    continue;

                String value = (String) _attrs.get(key);
                _inputState.registerAttribute(AbstractHtmlState.ATTR_GENERAL, key, value);
            }
        }

        TagRenderingBase br = TagRenderingBase.Factory.getRendering(TagRenderingBase.INPUT_BOOLEAN_TAG, req);
        br.doStartTag(buffer, _inputState);
        br.doEndTag(buffer);

        String ls = _labelStyle;
        String lsc = _labelStyleClass;

        _spanState.style = ls;
        _spanState.styleClass = lsc;

        br = TagRenderingBase.Factory.getRendering(TagRenderingBase.SPAN_TAG, req);
        br.doStartTag(buffer, _spanState);
        buffer.append(optionDisplay);
        br.doEndTag(buffer);

        // backward compatibility this is now overridden by the _orientation
        if (_orientation == null) {
            _cr.BR(buffer);
        }
        else {
            if (isVertical()) {
                _cr.TR_TD(buffer);
            }
            else {
                _cr.NBSP(buffer);
            }
        }
    }
556277
def _SetOptions(self, options, options_class_name):
    
    self._options = options
    self._options_class_name = options_class_name

    # Does this descriptor have non-default options?
    self.has_options = options is not None
385903
def append_attribute(node, attribute, value)
      current_value = node.get_attribute(attribute) || ''
      current_values = current_value.split(/\s+/)
      updated_value = current_values | [value]
      node.set_attribute(attribute, updated_value.join(' '))
    end
1361707
def add(self, option):
				
		if option.__class__ == Option:
			for _option in self.options:
				if option.name == _option.name:
					raise OptionDuplicateError(_option.name)
			self.options.append(option)
		else:
			raise TypeError("invalid type supplied")
389250
def set_option(self, key, value):
        """"""
        self._options.update(self._option_schema({key: value}))
        self.clear_cache()
786002
def add_option(name, parameters)
      self.class.handle_warnings(name, **parameters.dup)
      chain_options.merge(name => parameters.merge(method_hash(parameters)))
    end
1037628
def add(self, opt, val=None):
        """"""

        ov = opt.split('=', 1)
        o = ov[0]
        v = len(ov) > 1 and ov[1] or None

        if (v):
            if val != None:
                raise AttributeError("ambiguous option value")
            val = v

        if val == False:
            return

        if val in (None, True):
            self.optlist.add(o)
        else:
            self.optdict[o] = val
30471
public <I, V> void add(Option<I, V> option, V value) {
		getOrCreateValueContainer( option ).add( option.getOptionIdentifier(), value );
	}
1172356
def append(self, option):
        
        self._options.append(self._parse_option(option))
        self._refresh_options()
        self.resize(self._width, self._height)
1277713
function addOptionMethod( PluginClass ) {
				// don't overwrite original option method
				if ( PluginClass.prototype.option ) {
					return;
				}

			  // option setter
			  PluginClass.prototype.option = function( opts ) {
			    // bail out if not an object
			    if ( !$.isPlainObject( opts ) ){
			      return;
			    }
			    this.options = $.extend( true, this.options, opts );
			  };
			}
1250687
def Add(self, value, *optional):
        
        if isinstance(value, TListItemWithOption):
            if optional:
                raise RuntimeError(
                    "option specified along with "
                    "TListItemWithOption. Specify one or the "
                    "other but not both.")
            return super(List, self).Add(value.item, value.option)
        return super(List, self).Add(value, *optional)
925229
public void add(Option option) throws RequiredParametersException {
		if (!this.data.containsKey(option.getName())) {
			this.data.put(option.getName(), option);
		} else {
			throw new RequiredParametersException("Option with key " + option.getName() + " already exists.");
		}
	}
1029802
def add_option(self, value, text, selected=False):
        
        option = {"value": value, "text": text, "selected":selected}
        self.options += [option]
        if selected:
            self.selected_options += [option]
            self._value.append(value)
            if self._persist_value:
                self.settings.store_value("selected_options", self.selected_options)
1164322
public TemplateOptionsBuilder addOption(Object field, Object value) {
    additionalOptions.put(field, value);
    return this;
  }