Add a new entry.

@param key the key of the entry
@param value the value of the entry

@return true if the operation has succeeded
509503
public boolean add(final K key, final V value) {
        if (!this.map.containsKey(key)) {
            this.map.put(key, new ArrayList<V>());
        }
        return this.map.get(key).add(value);
    }
555939
public void put(int key, boolean value) {
        int i = ContainerHelpers.binarySearch(mKeys, mSize, key);

        if (i >= 0) {
            mValues[i] = value;
        } else {
            i = ~i;

            if (mSize >= mKeys.length) {
                int n = ArrayUtils.idealIntArraySize(mSize + 1);

                int[] nkeys = new int[n];
                boolean[] nvalues = new boolean[n];

                // Log.e("SparseBooleanArray", "grow " + mKeys.length + " to " + n);
                System.arraycopy(mKeys, 0, nkeys, 0, mKeys.length);
                System.arraycopy(mValues, 0, nvalues, 0, mValues.length);

                mKeys = nkeys;
                mValues = nvalues;
            }

            if (mSize - i != 0) {
                // Log.e("SparseBooleanArray", "move " + (mSize - i));
                System.arraycopy(mKeys, i, mKeys, i + 1, mSize - i);
                System.arraycopy(mValues, i, mValues, i + 1, mSize - i);
            }

            mKeys[i] = key;
            mValues[i] = value;
            mSize++;
        }
    }
1148458
public void add(final Param key, final String[] value) {
        if (value != null && value.length > 0) {
            parameters.put(key, toList(value));
        }
    }
1122704
public void add(String key, Object value) {
    validFieldName(key);
    ObjectFieldOperation op = OperationBuilder.gBuilder.create(OperationBuilder.OperationType.Add, key, value);
    addNewOperation(op);
  }
422640
public void put(String key, String value) {
        synchronized (this.cache) {
            this.cache.put(key, value);
        }
    }
353756
protected Entry<K, V> put(@NonNull K key, @NonNull V v) {
        Entry<K, V> newEntry = new Entry<>(key, v);
        mSize++;
        if (mEnd == null) {
            mStart = newEntry;
            mEnd = mStart;
            return newEntry;
        }

        mEnd.mNext = newEntry;
        newEntry.mPrevious = mEnd;
        mEnd = newEntry;
        return newEntry;

    }
155156
public void add(Object key, Object value) {
        Object existing = mMap.get(key);
        if (existing instanceof List) {
            if (value instanceof List) {
                ((List)existing).addAll((List)value);
            }
            else {
                ((List)existing).add(value);
            }
        }
        else if (existing == null && !mMap.containsKey(key)) {
            if (value instanceof List) {
                mMap.put(key, new ArrayList((List)value));
            }
            else {
                mMap.put(key, value);
            }
        }
        else {
            List list = new ArrayList();
            list.add(existing);
            if (value instanceof List) {
                list.addAll((List)value);
            }
            else {
                list.add(value);
            }
            mMap.put(key, list);
        }
    }
1184795
public TaskResult add(String key, CharSequence value) {
    mBundle.putCharSequence(key, value);
    return this;
  }
91517
public synchronized void insert(Object key, Object value) {
        // evict until size < maxSize
        while (isEvictionRequired() && entryLimit > 0 && entryLimit < Integer.MAX_VALUE) {
            evictStaleEntries();
        }

        Entry curEntry = new Entry(value);
        Entry oldEntry = (Entry) primaryTable.put(key, curEntry);

        if (oldEntry != null && oldEntry.value != null) {
            ArrayList<Object> evictedValues = new ArrayList<Object>();
            evictedValues.add(oldEntry.value);
            for (CacheEvictionListener evictionCallback : cacheEvictionListenerSet) {
                evictionCallback.evicted(evictedValues);
            }
        }
    }
300167
public void put(int key, boolean value) {
        int i = ContainerHelpers.binarySearch(mKeys, mSize, key);
        if (i >= 0) {
            mValues[i] = value;
        } else {
            i = ~i;
            mKeys = GrowingArrayUtils.insert(mKeys, mSize, i, key);
            mValues = GrowingArrayUtils.insert(mValues, mSize, i, value);
            mSize++;
        }
    }
468035
private void addEntry(K key, V value) {
    EntryImpl<K, V> entry = _poolFirst;
    if (entry != null) {
      _poolFirst = entry._after;
      entry._after = null;
    } else { // Pool empty.
      entry = new EntryImpl<K, V>();
    }

    // Setup entry paramters.
    entry._key = key;
    entry._value = value;
    int index = keyHash(key) & _mask;
    entry._index = index;

    // Connects to bucket.
    EntryImpl<K, V> next = _entries[index];
    entry._next = next;
    if (next != null) {
      next._previous = entry;
    }
    _entries[index] = entry;

    // Connects to collection.
    if (_mapLast != null) {
      entry._before = _mapLast;
      _mapLast._after = entry;
    } else {
      _mapFirst = entry;
    }
    _mapLast = entry;

    // Updates size.
    _size++;
    sizeChanged();
  }
766055
void add( K key, V value ) {
        List<V> rules = map.get( key );
        if( rules == null ) {
            rules = new ArrayList<>();
            map.put( key, rules );
        }
        rules.add( value );
    }
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;
    }
533104
public void putEDBObjectEntry(String key, Object value) {
        putEDBObjectEntry(key, value, value.getClass());
    }
1008215
@Override
  public void add(int value) {
    int key = toIntUnsigned(highbits(value));
    if (key != currentKey) {
      if (key < currentKey) {
        underlying.add(value);
        return;
      } else {
        appendToUnderlying();
        currentKey = key;
      }
    }
    C tmp = container.add(lowbits(value));
    if (tmp != container) {
      container = tmp;
    }
  }
573849
public final boolean add(final String key, final int exp, final Object value)
      throws TimeoutException, InterruptedException, MemcachedException {
    return this.add(key, exp, value, this.opTimeout);
  }
357661
public static Map<String, Object> newMap(String key, Object value) {
        final Map<String, Object> result = newMap();
        result.put(key, value);
        return result;
    }