Puts the value onto the context.

@param key the key for the value
@param val the value

@return the previous value set or {@code null} if no value was set
488487
public static Object put(String key, Object val) {
        return LoggerProviders.PROVIDER.putMdc(key, val);
    }
879800
public ValueMap putValue(String key, Object value) {
    delegate.put(key, value);
    return this;
  }
24604
public Object put(String key, JsonArray value) {
		if (value == null) {
			stateMap.put(key, Type.NULL);
		} else {
			stateMap.put(key, Type.ARRAY);
		}

		return super.put(key, value);
	}
1245147
public final V put(K key, V value) {
        if (key == null || value == null) {
            throw new NullPointerException("key == null || value == null");
        }

        V previous;
        synchronized (this) {
            putCount++;
            size += safeSizeOf(key, value);
            previous = map.put(key, value);
            if (previous != null) {
                size -= safeSizeOf(key, previous);
            }
        }

        if (previous != null) {
            entryRemoved(false, key, previous, value);
        }

        trimToSize(maxSize);
        return previous;
    }
50469
@Override
    public <T> T getValue(String key) {
        ValueObject vo = get(key);
        if (null == vo) {
            return null;
        }
        return vo.value();
    }
1185159
public function set($key, $val = null)
    {
        if (is_array($key)) {
            $this->_setpost = array_merge($this->_setpost, $key);
        } else {
            $this->_setpost[$key] = $val;
        }
        return $this;
    }
497127
private String getValue(String key, String previousValue) {
        final String value;
        final String valueUpdated = toSave.getProperty(key);
        if (valueUpdated == null) {
            value = previousValue;
        } else {
            value = valueUpdated;
        }
        return value;
    }
1062867
public V put(K key, V value) {

        if ((key != null) && (value != null)) {
            return m_internalMap.put(key, value);
        }
        Exception e = new Exception();
        try {
            // we want to print a stack trace when null is used as a key/value
            throw e;
        } catch (Exception e2) {
            e = e2;
        }
        if (key == null) {
            LOG.warn("Invalid null key in map", e);
            return null;
        }
        if (value == null) {
            LOG.warn("Invalid null value in map", e);
            return m_internalMap.remove(key);
        }
        return null;
    }
857255
public <T> void put(Key<T> key, T data) {
        if (data instanceof Factory<?>)
            throw new AssertionError("T extends Context.Factory");
        checkState(ht);
        Object old = ht.put(key, data);
        if (old != null && !(old instanceof Factory<?>) && old != data && data != null)
            throw new AssertionError("duplicate context value");
    }
1246480
@Override
	public final boolean put(String key, Bitmap value) {
		if (key == null || value == null) {
			throw new NullPointerException("key == null || value == null");
		}

		synchronized (this) {
			size += sizeOf(key, value);
			Bitmap previous = map.put(key, value);
			if (previous != null) {
				size -= sizeOf(key, previous);
			}
		}

		trimToSize(maxSize);
		return true;
	}
901311
static public Value put( Key key, Value val ) {
    Futures fs = new Futures();
    Value old = put(key,val,fs);
    fs.blockForPending();
    return old;
  }
48072
public static Object putIfAbsent(String key, Object value) {
        return value == null ? CONTEXT.remove(key) : CONTEXT.putIfAbsent(key, value);
    }
817435
public V put(K key, V value)
  {
    Entry<V> oldValue = _cache.put(key, new Entry<V>(_expireInterval, value));

    if (oldValue != null)
      return oldValue.getValue();
    else
      return null;
  }
996222
public void addNextValue(Object val) {
    String newVal = val.toString();
    if (this.minVal == null || this.minVal.compareTo(newVal) > 0) {
      this.minVal = newVal;
    }
  }
420152
public Object put(String key, String value) {
		if (value == null) {
			stateMap.put(key, Type.NULL);
		} else {
			stateMap.put(key, Type.STRING);
		}

		return super.put(key, value);
	}
824955
public ValueMap withNumberSet(String key, Set<BigDecimal> val) {
        super.put(key, val);
        return this;
    }
173019
@SuppressWarnings("unchecked")
    public M with(final String key, final String value) {
        put(key, value);
        return (M) this;
    }