Accumulates the elements into a new map.
If there are key duplications, the values are merged using the merger function, or the future is completed with a MapError.DUPLICATE_KEY if the function is not specified.
There are no guarantees on the type, mutability, or thread-safety of the map.
This is equivalent to:
seq.collect( Collectors.to_map<K,V,G>(...) );
This is a terminal operation.
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 |
a future of the result map |