put


Description:

public void put (owned K key, owned V value)

Associates the specified value with the specified key. If the key already exists, the value is replaced.

Example:

    var map = new HashMap<string,string> (GLib.str_hash, GLib.str_equal);
map.put ("key", "value");
assert (map.get ("key") == "value");

Parameters:

key

the key.

value

the value.