Returns a collector that accumulates the elements into a new map.
If there are key duplications, the values are merged using the merger function, or throws a MapError.DUPLICATE_KEY if the function is not specified.
There are no guarantees on the type, mutability, or thread-safety of the map.
key_mapper |
a mapping function for keys |
val_mapper |
a mapping function for values |
merger |
a function used to resolve key collisions. if not specified, (a, b) => { throw new MapError.DUPLICATE_KEY(...); } is used. |
key_hash |
a hash function for keys. if not specified, Gee.Functions.get_hash_func_for is used to get a proper function |
key_equal |
an equal function for keys. if not specified, Gee.Functions.get_equal_func_for is used to get a proper function |
value_equal |
an equal function for values. if not specified, Gee.Functions.get_equal_func_for is used to get a proper function |
the collector implementation |