Returns the value associated with the specified key, or the default value if the key is not found.
Example:
var map = new HashMap<string,string> (GLib.str_hash, GLib.str_equal);
assert (map.getOrDefault ("missing", "fallback") == "fallback");
| key |
the key to look up. |
| defaultValue |
the value to return if the key is not found. |
|
the associated value, or defaultValue if not found. |