Puts the given key/value into the given map only if the value is not null.

@param parameters the map to add to
@param key        the key of the value
@param value      the value to add if not null
347583
public static void addValueIfNotNull( @Nonnull Map<String, String> parameters, @Nonnull String key, Object value ) {
        if( value == null ) {
            return;
        }
        parameters.put(key, value.toString());
    }
1096133
private void setParameter(String key, Object value){
        if (value == null){
            parameters.remove(key);
        }     
        else{
            parameters.put(key, value);
        }
    }
366446
public void setParameters(Map<String, String> parameters) {
        if (parameters == null || parameters.isEmpty()) {
            this.parameterItemRuleMap = null;
        } else {
            ItemRuleMap itemRuleMap = new ItemRuleMap();
            for (Map.Entry<String, String> entry : parameters.entrySet()) {
                ItemRule ir = new ItemRule();
                ir.setTokenize(false);
                ir.setName(entry.getKey());
                ir.setValue(entry.getValue());
                itemRuleMap.putItemRule(ir);
            }
            this.parameterItemRuleMap = itemRuleMap;
        }
    }
1305905
public final void addString(String key, String... values) {
        if (values == null || Array.getLength(values) == 0) {
            return;
        }
        List<String> list = parameters.get(key);
        if (list == null) {
            list = new ArrayList<>();
        }
        list.addAll(Arrays.asList(values));
        parameters.put(key, list);
    }
1287755
@Override
    public String put(String key, String value) {

        String result = remove(key);
        add(key, value, false);
        return result;
    }
551423
public void pushParameterStack(Map parameters)
    {
        if (parameters == null)
        {
            _paramStack.push(null);
        } else {
            _paramStack.push(((Hashtable)parameters).clone());
        }
    }
511873
public void setValue(String key, String value) {
        KeyValue kv = getKV(key);
        if (kv != null) {
            kv.setValue(value);
        } else if (key != null) {
            map.add(new KeyValue(key,value));
        }
    }
1087400
public static void put(final String key, final String value) {
		try {
			systemRoot.put(fixKey(key), value);
		} catch (final Exception e) {
			System.err.print(e);
		}
	}
251445
public final void setArgument(final String key, final Object value) {

		if (key != null && value != null) {
			this.arguments.put(key, value);
		}
	}
861954
public void set(String key, String value)
    {
        if(key == null)
            throw new IllegalArgumentException("Null keys not allowed.");

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

        ArrayList<String> vals = new ArrayList<String>();
        vals.add(value);
        map.put(key,vals);

    }
1137824
public void addParameter(String name, Object value) {
        if (name == null) {
            throw new IllegalArgumentException("name must not be null");
        }
        params.put(name, value);
    }
292289
public void put(String key, Character value) {
		if (this.compiledStatement != null) {
			if (value == null) {
				this.compiledStatement.bindNull(compiledStatementBindIndex++);
			} else {
				compiledStatement.bindLong(compiledStatementBindIndex++, Character.getNumericValue(value));
			}
		} else if (values != null) {
			values.put(key, Character.getNumericValue(value));
			return;
		}

		names.add(key);
		// values.put(key, value);
		args.add(value);
		valueType.add(ParamType.CHARACTER);
	}
671203
public ParameterBuilder addAll(Map<String, Object> parameters) {
        if (parameters != null) {
            for (String k : parameters.keySet()) {
                if (parameters.get(k) != null) {
                    this.parameters.put(k, parameters.get(k));
                }
            }
        }
        return this;
    }
713307
public void put(String key, BigDecimal value) {
		if (this.compiledStatement != null) {
			if (value == null) {
				this.compiledStatement.bindNull(compiledStatementBindIndex++);
			} else {
				compiledStatement.bindString(compiledStatementBindIndex++, value.toPlainString());
			}
		} else if (values != null) {
			values.put(key, value.toPlainString());
			return;
		}

		names.add(key);
		// values.put(key, value);
		args.add(value);
		valueType.add(ParamType.INTEGER);
	}
1013218
private void addParameter(final String key, final String value,
        final Map<QueryParameter, String> newParams, final Set<QueryParameter> impl) {

        try {
            final QueryParameter ep = QueryParameter.valueOf(key.toUpperCase());
            if (!impl.contains(ep)) {
                throw new JaxRxException(400, "Parameter '" + key
                    + "' is not supported by the implementation.");
            }

            // append multiple parameters
            final String old = newParams.get(ep);
            // skip multiple key/value combinations if different to OUTPUT
            if (ep != QueryParameter.OUTPUT && ep != QueryParameter.VAR && old != null)
                return;

            // use \1 as delimiter for multiple values
            final char del = ep == QueryParameter.OUTPUT ? ',' : 0x01;
            newParams.put(ep, old == null ? value : old + del + value);
        } catch (final IllegalArgumentException ex) {
            throw new JaxRxException(400, "Parameter '" + key + "' is unknown.");
        }
    }
1032227
public void put(String key, Boolean value) {
		if (this.compiledStatement != null) {
			if (value == null) {
				this.compiledStatement.bindNull(compiledStatementBindIndex++);
			} else {
				this.compiledStatement.bindLong(compiledStatementBindIndex++, (((Boolean) value) == true ? 1 : 0));
			}
		} else if (values != null) {
			values.put(key, value);
			return;
		}

		names.add(key);
		args.add(value);
		valueType.add(ParamType.BOOLEAN);
	}
5084
public void putIfAbsent(String key, Object value) {
    if (!fields.containsEntry(key, value)) {
      fields.put(key, value);
    }
  }