Adds a particular key-value into the internal map. It returns the previous
value which was associated with that key.

@param key
@param value
@return
342400
public final FlatDataCollection put(Object key, FlatDataCollection value) {
        return internalData.put(key, value);
    }
1224757
@SuppressWarnings("unchecked")
    public V put(Integer key, V value) {

	int k = checkKey(key);
	int index = Arrays.binarySearch(keyIndices, k);

	if (index >= 0) {
	    V old = (V)(values[index]);
	    values[index] = value;
	    return old;
	}
	else {
	    int newIndex = 0 - (index + 1);	    
	    Object[] newValues = Arrays.copyOf(values, values.length + 1);
	    int[] newIndices = Arrays.copyOf(keyIndices, values.length + 1);

	    // shift the elements down to make room for the new value
	    for (int i = newIndex; i < values.length; ++i) {
		newValues[i+1] = values[i];
		newIndices[i+1] = keyIndices[i];
	    }

	    // insert the new value
	    newValues[newIndex] = value;
	    newIndices[newIndex] = k;

	    // switch the arrays with the lengthed versions
	    values = newValues;
	    keyIndices = newIndices;
	    
	    return null;
	}
    }
723455
public static <K, V> HashMap<K, V> newHashMap(K key, V value) {
        HashMap<K, V> map = new HashMap<K, V>();
        map.put(key, value);
        return map;
    }
816218
public QueryRequest addParameter(String key, Object value) {
        if (parameters.get(key) == null) {
            parameters.put(key, Sets.newHashSet(value));
        } else {
            parameters.get(key).add(value);
        }
        return this;
    }
1237474
public synchronized boolean add(String key, T value) {
        if (key.length() > 3 && key.endsWith(WILDCARD) && key.charAt(key.length() - 2) != '.') {
            throw new IllegalArgumentException("Unsupported use of wildcard in key " + key);
        }

        // Find the key in the structure (build out to it)
        Node<T> current = internalFind(key, false);

        // Return false if the key already exists
        if (current.getValue() != null)
            return false;

        // Set the value and return true
        current.setValue(value);
        return true;
    }
173019
@SuppressWarnings("unchecked")
    public M with(final String key, final String value) {
        put(key, value);
        return (M) this;
    }
676641
public JsonObject<V> addData(String key, Object value) {
        if (key == null) {
            return this;
        }
        if (this.data == null) {
            this.data = new HashMap<String, Object>();
        }
        this.data.put(key, value);
        return this;
    }
369077
public ContentValues put(String key, String value) {
        mValues.put(key, value);
        return this;
    }
991618
public Object put(int key, Object value) {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
            Tr.entry(tc, "put");
        }
        if (value == null) {
            if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                Tr.debug(tc, "value == null");
            }
            throw new NullPointerException("Missing value");
        }

        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
            Tr.debug(tc, "key " + key);
        }
        // check the table
        FastSyncHashBucket bucket = getBucket(key);
        Object retVal = syncGetValueFromBucket(bucket, key, false);
        if (retVal != null) {
            if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
                Tr.exit(tc, "put: key is already defined in bucket...returning value from bucket and new key value will be discarded.");
            return retVal;
        }
        // new entry
        FastSyncHashEntry e = new FastSyncHashEntry(key, value);
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
            Tr.exit(tc, "put: put new key and value into bucket");
        }
        return syncPutIntoBucket(bucket, e);
    }
618443
@Override
  public final V put(K key, V value) {
    int index = getIndexOfKey(key);
    if (index == -1) {
      index = this.size;
    }
    return set(index, key, value);
  }
584936
public <V> V putIfAbsent(Key<V> key, V value) {
    requireNonNull(key);
    requireNonNull(value);
    if (canStore(key)) {
      @SuppressWarnings("unchecked")
      V existingValue = (V) entries.get(key);
      if (value == RECURSION_SENTINEL) {
        throw new ConcurrentModificationException(
            "Cannot access scope key " + key + " while computing its value");
      } else if (existingValue == null) {
        entries.put(key, value);
      }
      return existingValue;
    } else if (parent != null) {
      return parent.putIfAbsent(key, value);
    } else {
      throw new IllegalStateException(
          "Not in " + key.level().toString().toLowerCase() + " scope");
    }
  }
1013595
public int put(final int key, final int value)
    {
        if (value == missingValue)
        {
            throw new IllegalArgumentException("cannot accept missingValue");
        }

        final int[] entries = this.entries;
        final int missingValue = this.missingValue;
        @DoNotSub final int mask = entries.length - 1;
        @DoNotSub int index = Hashing.evenHash(key, mask);
        int oldValue = missingValue;

        while (entries[index + 1] != missingValue)
        {
            if (entries[index] == key)
            {
                oldValue = entries[index + 1];
                break;
            }

            index = next(index, mask);
        }

        if (oldValue == missingValue)
        {
            ++size;
            entries[index] = key;
        }

        entries[index + 1] = value;

        increaseCapacity();

        return oldValue;
    }
435818
@Override
    public R put(D key, R value) {
        return map.put(key, value);
    }
803355
public MapBuilder<K,V> put( K key, V value)
    {
    map_.put( key, value);
    return this;
    }
1192219
public Environment add(@NonNull String key, @NonNull Object value) {
        return set(key, value);
    }
409427
public float putAndGet(final int key, final float value) {
        int index = findInsertionIndex(key);
        float previous = missingEntries;
        boolean newMapping = true;
        if (index < 0) {
            index = changeIndexSign(index);
            previous = values[index];
            newMapping = false;
        }
        keys[index]   = key;
        states[index] = FULL;
        values[index] = value;
        if (newMapping) {
            ++size;
            if (shouldGrowTable()) {
                growTable();
            }
            ++count;
        }
        return previous;
    }
879800
public ValueMap putValue(String key, Object value) {
    delegate.put(key, value);
    return this;
  }