Set the value of one or more properties
@method module:ok.Map#set
@param {Object} attrs Hash of property names and values to set
 
Set the value of a single property
@param {string} name Property name
@param {*} newValue Property value
350779
function (name, newValue) {
		if (arguments.length > 1) {
			this.setValue(name, newValue);
		}
		else {
			var attrs = name;
			this.setMap(attrs);
		}
	}
1024243
public void setValue(Object newValue)
    {
    	if (FieldMetadata.NOT_KNOWN.equals(newValue))
    	{
            setUnknown(false);
            m_notKnown = true;
            return;
    		//throw new RuntimeException("Inconsistent use of NOT_KNOWN");
    	}
    	if (FieldMetadata.UNKNOWN.equals(newValue))
    	{
            setUnknown(true);
            m_notKnown = false;
            return;
    		//throw new RuntimeException("Inconsistent use of UNKNOWN");
    	}
        if (isDerived() && !ValidationUtils.equals(m_currentValue,newValue))
        {
            final String labelName = getPropertyMetadata().getLabelName();
            final String message = m_messageSourceAccessor.getMessage(
                    "nz.co.senanque.validationengine.derivedValue",
                    new Object[]
                    { labelName, newValue }, 
                    "Cannot set derived field.");
            throw new ValidationException(message);
        }
        m_currentValue = newValue;
        useCurrentValue(true);
        setUnknown(false);
        m_notKnown = false;
        
        addHistory(newValue);
    }
1087204
function setSetAttribute(path, setName, attrName, attrValue, msg) {
            var node = _getNode(path);

            if (node) {
                state.core.setSetAttribute(node, setName, attrName, attrValue);
                saveRoot(typeof msg === 'string' ?
                    msg : 'setSetAttribute(' + path + ',' + setName + ',' + attrName + ',' +
                    JSON.stringify(attrValue) + ')');
            }
        }
1008136
function(attr, value, keepKey) {
                    // Convert `attr` to attr parts (if it isn't already).
                    var parts = can.Map.helpers.attrParts(attr, keepKey),
                        // The immediate prop we are setting.
                        prop = parts.shift(),
                        // We only need to get the current value if we are not in init.
                        current = this._init ? undefined : this.__get(prop);

                    if (parts.length && Map.helpers.isObservable(current)) {
                        // If we have an `object` and remaining parts that `object` should set it.
                        current._set(parts, value);
                    } else if (!parts.length) {
                        // We're in "real" set territory.
                        if (this.__convert) {
                            //Convert if there is a converter
                            value = this.__convert(prop, value);
                        }
                        this.__set(prop, this.__type(value, prop), current);
                    } else {
                        throw "can.Map: Object does not exist";
                    }
                }
861681
function(newValue,property,config) {
                var thesetter = config.setter;
                if ( typeof(config.setter) === 'string' ) {
                    record[config.setter](newValue, property, config,record);
                } else {
                    //assume function
                    thesetter.call(record,newValue, property, config,record);
                }

            }
477505
function (newValue) {
                    // and no inheritance is involved
                    if (this === self) {
                      // notify the method but ...
                      var value = oldValue;
                      updateValue(newValue);
                      // ... do not update the get value
                      oldValue = value;
                    } else {
                      // with inheritance, simply set the property
                      // as if it was a regular assignment operation
                      setValue(this, prop, newValue);
                    }
                  }
576030
function setTokenAttribute(token, attributeName, attributeValue) {
    var index = token.attrIndex(attributeName);
    var attr = [attributeName, attributeValue];

    if (index < 0) {
        token.attrPush(attr);
    } else {
        token.attrs[index] = attr;
    }
}
1080890
def attributes=(attrs = {})
      attrs.each do |attr_name, value|
        setter = "#{attr_name}="
        send(setter, value)
      end
    end
415091
function(attrs, value, opt) {

        var args = Array.from(arguments);
        if (args.length === 0) {
            return this.get('attrs');
        }

        if (Array.isArray(attrs)) {
            args[0] = ['attrs'].concat(attrs);
        } else if (joint.util.isString(attrs)) {
            // Get/set an attribute by a special path syntax that delimits
            // nested objects by the colon character.
            args[0] = 'attrs/' + attrs;

        } else {

            args[0] = { 'attrs' : attrs };
        }

        return this.prop.apply(this, args);
    }
722204
function (attrs/*, ...*/) {
    if (HTML.isArray(attrs)) {
      var argsCopy = SLICE.call(arguments);
      var result = attrs;
      for (var i = 0; i < attrs.length; i++) {
        var oldItem = attrs[i];
        argsCopy[0] = oldItem;
        var newItem = this.visitAttributes.apply(this, argsCopy);
        if (newItem !== oldItem) {
          // copy on write
          if (result === attrs)
            result = attrs.slice();
          result[i] = newItem;
        }
      }
      return result;
    }

    if (attrs && HTML.isConstructedObject(attrs)) {
      throw new Error("The basic HTML.TransformingVisitor does not support " +
                      "foreign objects in attributes.  Define a custom " +
                      "visitAttributes for this case.");
    }

    var oldAttrs = attrs;
    var newAttrs = oldAttrs;
    if (oldAttrs) {
      var attrArgs = [null, null];
      attrArgs.push.apply(attrArgs, arguments);
      for (var k in oldAttrs) {
        var oldValue = oldAttrs[k];
        attrArgs[0] = k;
        attrArgs[1] = oldValue;
        var newValue = this.visitAttribute.apply(this, attrArgs);
        if (newValue !== oldValue) {
          // copy on write
          if (newAttrs === oldAttrs)
            newAttrs = _assign({}, oldAttrs);
          newAttrs[k] = newValue;
        }
      }
    }

    return newAttrs;
  }
990650
def set(self, name, value):
        
        attr = self.getAttribute(name)
        if attr is None:
            attr = Attribute(name, value)
            self.append(attr)
        else:
            attr.setValue(value)
724558
def setattr(self, attr, new_value, close_the_changeset=True):
        """"""
        existing_value = getattr(self, attr, None)
        if existing_value != new_value:
            setattr(self, attr, new_value)
            self._changeset[attr] = new_value

        if close_the_changeset and self._changeset:
            self._call_callbacks()
237386
function setValue(descriptor,key,set,update)
        {
          var _descriptor = descriptor,
              _key = key,
              _set = set,
              _update = update,
              _oldValue;
          return function valueSet(v)
          {
            _oldValue = _descriptor.value;
            if(_set(this,_key,v,_oldValue,arguments,this._stopChange))
            {
              _descriptor.value = v;
            }
            if(!this._stopChange)
            {
              _update(this,_key,v,_oldValue,arguments);
            }
            this._stopChange = undefined;
          }
        }
615366
public void setValueOff(String newValue, @Nullable String newName) {
            if (!isChecked()) { // refining on valueOff: facetRefinement needs an update
                searcher.updateFacetRefinement(attribute, valueOff, false)
                        .updateFacetRefinement(newName != null ? newName : attribute, newValue, true)
                        .search();
            }
        this.valueOff = newValue;
        applyEventualNewAttribute(newName);
    }
3738
public void setValueOn(String newValue, @Nullable String newName) {
        if (isChecked()) { // refining on valueOn: facetRefinement needs an update
            searcher.updateFacetRefinement(attribute, valueOn, false)
                    .updateFacetRefinement(newName != null ? newName : attribute, newValue, true)
                    .search();
        }
        this.valueOn = newValue;
        applyEventualNewAttribute(newName);
    }
668671
function (newValue) {
                var attribute, domElt = this.getDom(), whiteList = ariaTemplatesDomElementWrapper.attributesWhiteList, newAttributeValue;
                var oldValue = this.attributes;

                // remove old members
                for (attribute in oldValue) {
                    if (oldValue.hasOwnProperty(attribute)) {
                        if (attribute == "dataset") {
                            ariaUtilsHtml.removeDataset(domElt, oldValue[attribute]);
                        } else if (!newValue[attribute]) {
                            if (attribute == "classList") {
                                this.getWrapper().classList.setClassName("");
                            } else {
                                domElt.removeAttribute(attribute);
                            }
                        }
                    }
                }

                // add new members
                for (attribute in newValue) {
                    newAttributeValue = newValue[attribute];
                    if (newValue.hasOwnProperty(attribute) && !this.__json.isMetadata(attribute)
                            && newAttributeValue != null) {
                        if (attribute == "classList") {
                            this.getWrapper().classList.setClassName(newAttributeValue.join(" "));
                        } else if (attribute == "dataset") {
                            ariaUtilsHtml.setDataset(domElt, newAttributeValue);
                        } else if (whiteList.test(attribute) && newAttributeValue !== oldValue[attribute]) {
                            domElt.setAttribute(attribute, newAttributeValue);
                        }
                    }
                }

                this.attributes = this.__json.copy(newValue);
            }
958798
public final void setAttribute(@NonNull String newAttribute) {
        searcher.removeFacet(attribute).addFacet(newAttribute);
        updateRefinementWithNewName(newAttribute);
        attribute = newAttribute;
    }