Adds an entry to the map for this builder if the given value is present.
335440
public MapBuilder<K,V> putIf( K key, Optional<V> value)
    {
    value.ifPresent( v -> map_.put( key, v));
    return this;
    }
11115
def add(entry_or_key, value = nil)
      if value.nil? and entry_or_key.is_a?(Entry) # treat as entry
        entry = entry_or_key
      else
        entry = Entry.new(entry_or_key)
        entry.password = value
      end

      entry.validate!

      @backend.transaction{
        timestamp!(:last_modified)
        @backend[:user][encrypt(entry.name)] = encrypt(EntryMapper.to_json(entry))
      }
    end
1309776
public V _put(K key, V value) {
        V retval=map.put(key, value);
        for(Notification notif:notifs)
            notif.entrySet(key, value);
        return retval;
    }
803355
public MapBuilder<K,V> put( K key, V value)
    {
    map_.put( key, value);
    return this;
    }
419646
public void add(String name, Iterable<?> value) {
		if (value != null) {
			this.content.put(name, value);
		}
	}
1031013
public void add(K key, V value) {
		List<V> values = this.targetMap.get(key);
		if (values == null) {
			values = new LinkedList<V>();
			this.targetMap.put(key, values);
		}
		values.add(value);
	}
310999
public void add (Object value)
    {
        _list[_lastPos++ % _list.length] = value;
        // keep last pos cycling from keepCount to 2*keepCount-1
        if (_lastPos == 2*_list.length) {
            _lastPos = _list.length;
        }
    }
405912
private void addInternal(String key, String value) {

        Object currentObj = m_configurationObjects.get(key);
        String currentStr = get(key);

        if (currentObj instanceof String) {
            // one object already in map - convert it to a list
            ArrayList<String> values = new ArrayList<String>(2);
            values.add(currentStr);
            values.add(value);
            m_configurationObjects.put(key, values);
            m_configurationStrings.put(key, currentStr + ParameterTokenizer.COMMA + value);
        } else if (currentObj instanceof List) {
            // already a list - just add the new token
            @SuppressWarnings("unchecked")
            List<String> list = (List<String>)currentObj;
            list.add(value);
            m_configurationStrings.put(key, currentStr + ParameterTokenizer.COMMA + value);
        } else {
            m_configurationObjects.put(key, value);
            m_configurationStrings.put(key, value);
        }
    }
1205422
public void add(K key, V value)
  {
    if (key == null) {
      return;
    }

    K []keys = _keys;
    final int size = _size;
    
    for (int i = size - 1; i >= 0; i--) {
      if (key.equals(keys[i])) {
        _values[i].add(value);
        return;
      }
    }

    if (! ensureCapacity(size)) {
      return;
    }
    
    _keys[size] = key;
    _values[size] = new ArrayList<V>();
    _values[size].add(value);
    
    _size = size + 1;
  }
1045588
public void add(Param key, Object value) {
        // check to see if we have a default value and skip it
        if (defaults.containsKey(key) && defaults.get(key).equals(value)) {
            // We already have this value, so skip it
            return;
        }
        parameters.put(key, value);
    }
884346
private static void addMapping(Map<String, String> map, String key, String value, String kind) {
    String oldValue = map.put(key,  value);
    if (oldValue != null && !oldValue.equals(value)) {
      ErrorUtil.error(kind + " redefined; was \"" + oldValue + ", now " + value);
    }
  }
533104
public void putEDBObjectEntry(String key, Object value) {
        putEDBObjectEntry(key, value, value.getClass());
    }
790957
public void add(Counter<? extends T> counter) {
        for (Map.Entry<? extends T,Integer> e : counter) {
            T t = e.getKey();
            Integer cur = counts.get(t);
            counts.put(t, (cur == null) ? e.getValue() : cur + e.getValue());
        }
    }
726540
private void appendEntry(Map.Entry<String, EDBObjectEntry> entry, StringBuilder builder) {
        if (builder.length() > 2) {
            builder.append(",");
        }
        builder.append(" \"").append(entry.getKey()).append("\"");
        builder.append(" : ").append(entry.getValue());
    }
906753
public int put(Object key, int value)
  {
    if (key == null)
      key = NULL_KEY;

    synchronized (this) {
      int hash = key.hashCode() & _mask;

      for (Item item = _entries[hash]; item != null; item = item._next) {
        Object testKey = item._key;

        if (testKey == key || testKey.equals(key)) {
          int oldValue = item._value;

          item._value = value;

          return oldValue;
        }
      }

      Item item = new Item(key, value);
      item._next = _entries[hash];

      _entries[hash] = item;

      _size++;
    }

    return NULL;
  }
597438
public boolean add(E entry)
	{
		super.add(entry);
		
		if(this.size() > this.maxSize)
		{
			super.removeRange(0, this.size() - maxSize);
		}
		
		return true;
	}
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;
    }
  }