summaryrefslogtreecommitdiff
path: root/gee/hashmultimap.vala
diff options
context:
space:
mode:
Diffstat (limited to 'gee/hashmultimap.vala')
-rw-r--r--gee/hashmultimap.vala18
1 files changed, 10 insertions, 8 deletions
diff --git a/gee/hashmultimap.vala b/gee/hashmultimap.vala
index 3a10220..2eddecd 100644
--- a/gee/hashmultimap.vala
+++ b/gee/hashmultimap.vala
@@ -24,17 +24,19 @@
* Hash table implementation of the {@link MultiMap} interface.
*/
public class Gee.HashMultiMap<K,V> : AbstractMultiMap<K,V> {
- public HashFunc key_hash_func {
+ public HashDataFunc<K> key_hash_func {
get { return ((HashMap<K, Set<V>>) _storage_map).key_hash_func; }
}
- public EqualFunc key_equal_func {
+ public EqualDataFunc<K> key_equal_func {
get { return ((HashMap<K, Set<V>>) _storage_map).key_equal_func; }
}
- public HashFunc value_hash_func { private set; get; }
+ [CCode (notify = false)]
+ public HashDataFunc<V> value_hash_func { private set; get; }
- public EqualFunc value_equal_func { private set; get; }
+ [CCode (notify = false)]
+ public EqualDataFunc<V> value_equal_func { private set; get; }
/**
* Constructs a new, empty hash multimap.
@@ -47,9 +49,9 @@ public class Gee.HashMultiMap<K,V> : AbstractMultiMap<K,V> {
* @param value_hash_func an optional value hash function
* @param value_equal_func an optional value equality testing function
*/
- public HashMultiMap (HashFunc? key_hash_func = null, EqualFunc? key_equal_func = null,
- HashFunc? value_hash_func = null, EqualFunc? value_equal_func = null) {
- base (new HashMap<K, Set<V>> (key_hash_func, key_equal_func, direct_equal));
+ public HashMultiMap (owned HashDataFunc<K>? key_hash_func = null, owned EqualDataFunc<K>? key_equal_func = null,
+ owned HashDataFunc<V>? value_hash_func = null, owned EqualDataFunc<V>? value_equal_func = null) {
+ base (new HashMap<K, Set<V>> (key_hash_func, key_equal_func, Functions.get_equal_func_for (typeof (Set))));
if (value_hash_func == null) {
value_hash_func = Functions.get_hash_func_for (typeof (V));
}
@@ -68,7 +70,7 @@ public class Gee.HashMultiMap<K,V> : AbstractMultiMap<K,V> {
return new HashMultiSet<K> (key_hash_func, key_equal_func);
}
- protected override EqualFunc get_value_equal_func () {
+ protected override EqualDataFunc get_value_equal_func () {
return _value_equal_func;
}
}