Sets the value for the appropriate key in the {@link Properties}.

@param key the key to set
@param value the value for the key
513917
public static void set(PropertyKey key, Object value) {
    set(key, String.valueOf(value), Source.RUNTIME);
  }
882197
@Override
    public void set(String key, String value) {
    	if("dn".equals(key)) {
    		this.dn = value;
    	} else if (value != null
                && !value.isEmpty()
                && key != null
                && !key.isEmpty()) {
            addAttribute(new BasicAttribute(key, value, true));
        }
    }
121800
public void add(String key, String value)
    {
        if(key == null)
            throw new IllegalArgumentException("Null keys not allowed.");

        if(value == null)
            throw new IllegalArgumentException("Null values not allowed.");

        List<String> vals = map.get(key);
        if(vals == null)
        {
            vals = new ArrayList<String>();
            map.put(key,vals);
        }

        vals.add(value);
    }
1187793
public void setProperty(String key, String value)
  {
    if(key.equals(OutputKeys.METHOD))
    {
      setMethodDefaults(value);
    }
    
    if (key.startsWith(OutputPropertiesFactory.S_BUILTIN_OLD_EXTENSIONS_UNIVERSAL))
      key = OutputPropertiesFactory.S_BUILTIN_EXTENSIONS_UNIVERSAL
         + key.substring(OutputPropertiesFactory.S_BUILTIN_OLD_EXTENSIONS_UNIVERSAL_LEN);
    
    m_properties.put(key, value);
  }
1010460
public void setAttribute(String key, Object value) {

        if (m_attributes == null) {
            m_attributes = new HashMap<String, Object>(4);
        }
        m_attributes.put(key, value);
    }
1358931
public void setData(String key, Object value) {
        this.data = this.data.addData(key, value);
    }
584929
public synchronized void setProperty(PropertyKey key, Object value)
    {
        if (!isValidKey(key))
            throw new IllegalArgumentException("Key " + key + " is not valid for " + getMapClass());

        //
        // Validate the value argument, based upon the property type reference by the key
        //
        Class propType = key.getPropertyType();
        if (value == null)
        {
            if (propType.isPrimitive() || propType.isAnnotation())
                throw new IllegalArgumentException("Invalid null value for key " + key);
        }
        else
        {
            if (propType.isPrimitive())
                propType = (Class)_primToObject.get(propType);

            if (!propType.isAssignableFrom(value.getClass()))
            {
                throw new IllegalArgumentException("Value class (" + value.getClass() + 
                                                   ") not of expected type: " + propType);
            }
        }
        _properties.put(key, value);
        _propertySets.add(key.getPropertySet());
    }
633168
public void addProperty(String key, String value) {
        if (null == properties) {
            properties = new HashMap<>();
        }
        properties.put(key, value);
    }
1064338
public void setInt(@NotNull final String key, @NotNull final int value) {
        props.setProperty(key, String.valueOf(value));
        LOGGER.debug("Setting: {}='{}'", key, value);
    }
1338876
private void set(String key, String... values) {
            String value = get(values);
            
            if (value != null) {
                put(getLabel(key), value);
            }
        }
1096133
private void setParameter(String key, Object value){
        if (value == null){
            parameters.remove(key);
        }     
        else{
            parameters.put(key, value);
        }
    }
918027
protected function setKey($key, $value)
    {
        if ($key == $this->_keyName) {
            $this->_keyValue = $value;
            $this->_key['value'] = $value;
        }
    }
1180849
public static void setAttribute(String key, Object value) {
        assertInitialized();
        getAppFramework().setAttribute(key, value);
    }
33857
@JsonAnySetter
    public void putConfigurationValue(String key, Object value) {
        this.configuration.put(key, value);
    }
457727
public void put(Object key, Object value)
    {
        keyTable.put(key, value);
        valueTable.put(value, key);
    }
569919
public void setKey(org.openprovenance.prov.model.Key value) {
        this.key = (org.openprovenance.prov.sql.Key)value;
    }
507675
public <T> void put(Key<T> key, T value) {
    Preconditions.checkNotNull(key, "key");
    Preconditions.checkNotNull(value, "value");
    maybeExpand();
    name(size, key.asciiName());
    value(size, key.toBytes(value));
    size++;
  }