HashTable
Object Hierarchy:
Description:
[ Compact ]
[ CCode ( ref_function = "g_hash_table_ref" , type_id = "G_TYPE_HASH_TABLE" , type_signature = "a{%s}" , unref_function = "g_hash_table_unref" ) ]
public class HashTable<K,V>
Content:
Properties:
Creation methods:
Methods:
- public void @foreach (HFunc<K,V> func)
- public unowned V @get (K key)
- public bool @set (owned K key, owned V value)
- public bool add (owned K key)
- public bool contains (K key)
- public unowned V find (HRFunc<K,V> predicate)
Calls the given function for key/value pairs in the
GenericSet until predicate returns true
.
- public void for_each (HFunc<K,V> func)
Calls the given function for each of the key/value pairs in the
GenericSet.
- public uint foreach_remove (HRFunc<K,V> predicate)
Calls the given function for each key/value pair in the
GenericSet.
- public uint foreach_steal (HRFunc<K,V> predicate)
Calls the given function for each key/value pair in the
GenericSet.
- public List<unowned K> get_keys ()
- public (unowned K)[] get_keys_as_array ()
- public GenericArray<unowned K> get_keys_as_ptr_array ()
- public List<unowned V> get_values ()
- public GenericArray<unowned V> get_values_as_ptr_array ()
- public bool insert (owned K key, owned V value)
- public unowned V lookup (K key)
- public bool lookup_extended (K lookup_key, out unowned K orig_key, out unowned V value)
Looks up a key in the
GenericSet, returning the original key and the associated value and a bool which is
true if the key was found.
- public bool remove (K key)
- public void remove_all ()
- public bool replace (owned K key, owned V value)
- public uint size ()
Returns the number of elements contained in the
GenericSet.
- public bool steal (K key)
Removes a key and its associated value from a
GenericSet without calling the key and value destroy functions.
- public void steal_all ()
Removes all keys and their associated values from a
GenericSet without calling the key and value destroy functions.
- public GenericArray<K> steal_all_keys ()
Removes all keys and their associated values from a
GenericSet without calling the key destroy functions, returning the keys as a
GenericArray with the free func set to the hash_table key destroy
function.
- public GenericArray<V> steal_all_values ()
Removes all keys and their associated values from a
GenericSet without calling the value destroy functions, returning the values as a
GenericArray with the free func set to the hash_table value destroy
function.
- 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.
- public V take (K key, out bool exists = null)