Sets a property value only if the value is not null.

@param key the key for the property
@param value the value for the property
542003
public void setBooleanIfNotNull(@NotNull final String key, @Nullable final Boolean value) {
        if (null != value) {
            setBoolean(key, value);
        }
    }
1094198
public synchronized void setOption(String key, String value)
	{
		if (key == null || value == null) {
			return;
		}
		config.put(key, value);
	}
1050885
public void setAttribute(String key, String value) {
/*		if (!attributes.containsKey(key))
		{
			sortedAttributes.add(key);
		}*/
		if (nodeAttributes == null) {
			nodeAttributes = new Properties();
		}
		nodeAttributes.setProperty(key, value);
	}
939210
public synchronized void setAttribute(String key, Boolean value)
	{
		if(attributes.containsKey(key))
		{
			attributes.remove(key);
		}
		attributes.put(key, value);
	}
1122551
public MemberConfig setProperty(String key, String value) {
    this.properties.put(key, value);
    return this;
  }
960819
@Override
    public final void set(T value) {
        super.set(value);
        // may set null to remove value
        if (null == value) removeValue();
        else addValue();
    }
970389
public final void setValue(@Nullable final String value) {
        if (!TextUtils.equals(this.value, value)) {
            this.value = value;
            persistString(value);
            notifyChanged();
        }
    }
739511
public void set(String propName, Object value) {
        if (propName.equals("key")) {
            setKey(((String) value));
        }
        if (propName.equals("value")) {
            setValue(value);
        }
    }
833446
@Override
	public Object setProperty(final String key, final String value) {
		lock.writeLock().lock();
		try {
			return properties.setProperty(key, value);
		} finally {
			lock.writeLock().unlock();
		}
	}
877033
public void updateConf(PropertyKey key, @Nullable String value) {
    if (value == null) {
      mProperties.remove(key);
    } else {
      mProperties.put(key, value);
    }
  }
1268233
public synchronized void put(@NonNull String key, @Nullable String value) {
    if (value == null) {
      putNull(key);
      return;
    }

    try {
      this.content.put(key, value);
    } catch (JSONException je) {
      Log.e(TAG, "Failed json encode value: " + String.valueOf(value));
    }
  }
387162
public void setIntIfNotNull(@NotNull final String key, @Nullable final Integer value) {
        if (null != value) {
            setInt(key, value);
        }
    }
868964
public void put(final String key, final String value) {
        if (value == null) {
            throw new IllegalArgumentException("No value provided for key " + key);
        }
        validate(key, value);
        data.putValue(key, value);
    }
1334977
public void set(String key, Object value) {
		if (globalVar == null) globalVar = new HashMap<String, Object>();
		globalVar.put(key, value);
	}
418290
public Object setProperty(final String key, final String value) {
        return prop.put(key, value);
    }
1096133
private void setParameter(String key, Object value){
        if (value == null){
            parameters.remove(key);
        }     
        else{
            parameters.put(key, value);
        }
    }
632834
public synchronized void setValue(String name, String value) {
        if (map == null) {
            map = new HashMap<String,String>();
        }
        map.put(name, value);
    }