/** * Adds a new key/value pair into this map. If the key is not yet in the * map, it gets added to the map and the call is equal to * put(Object,Object). * * @param key the key. * @param val the value. * @return true, if the value has been added, false otherwise */ public boolean add(final Object key, final Object val) { final List v = (List) this.table.get(key); if (v == null) { put(key, val); return true; } else { return v.add(val); } }
/** * Adds a new key/value pair into this map. If the key is not yet in the * map, it gets added to the map and the call is equal to * put(Object,Object). * * @param key the key. * @param val the value. * @return true, if the value has been added, false otherwise */ public boolean add(final Object key, final Object val) { final List v = (List) this.table.get(key); if (v == null) { put(key, val); return true; } else { return v.add(val); } }
/** * Adds a new key/value pair into this map. If the key is not yet in the * map, it gets added to the map and the call is equal to * put(Object,Object). * * @param key the key. * @param val the value. * @return true, if the value has been added, false otherwise */ public boolean add(final Object key, final Object val) { final List v = (List) this.table.get(key); if (v == null) { put(key, val); return true; } else { return v.add(val); } }