steal_extended
Description:
public bool steal_extended (K lookup_key, out K stolen_key, out V stolen_value)
Looks up a key in the GenericSet, stealing the original key and the associated value and returning true if the key was found.
If the key was not found, false is returned.
If found, the stolen key and value are removed from the hash table without calling the key and value destroy functions, and ownership is
transferred to the caller of this method, as with steal. That is the case
regardless whether stolen_key
or stolen_value
output parameters are requested.
You can pass null for lookup_key
, provided the hash and equal functions of hash_table
are null-safe.
The dictionary implementation optimizes for having all values identical to their keys, for example by using add. When stealing both the key and the value from such a dictionary, the value will be null.
Parameters:
lookup_key |
the key to look up |
stolen_key |
return location for the original key |
stolen_value |
return location for the value associated with the key |
hash_table |
Returns:
true if the key was found in the GenericSet |