@SuppressWarnings("unchecked") @Override public void putAll(final Map m) { for (final Map.Entry entry : (Set<Map.Entry>) m.entrySet()) { put(entry.getKey().toString(), entry.getValue()); } }
/** * Puts a value at an index. For interface compatibility. Must be passed a String that is parsable to an int. * * @param key the index at which to insert the value * @param v the value to insert * @return the value * @throws IllegalArgumentException if {@code key} cannot be parsed into an {@code int} */ @Override public Object put(final String key, final Object v) { return put(_getInt(key), v); }
@Override public void putAll(final BSONObject o) { for (final String k : o.keySet()) { put(k, o.get(k)); } }
/** * Sets all key/value pairs from a map into this object * * @param m * the map */ @SuppressWarnings("unchecked") public void putAll(Map m) { for (Map.Entry entry : (Set<Map.Entry>) m.entrySet()) { put(entry.getKey().toString(), entry.getValue()); } }
/** * Puts a value at an index. For interface compatibility. Must be passed a * String that is parsable to an int. * * @param key * the index at which to insert the value * @param v * the value to insert * @return the value * @throws IllegalArgumentException * if <code>key</code> cannot be parsed into an <code>int</code> */ public Object put(String key, Object v) { return put(_getInt(key), v); }
/** * Sets all key/value pairs from an object into this object * * @param o * the object */ public void putAll(BSONObject o) { for (String k : o.keySet()) { put(k, o.get(k)); } }