to_set


Description:

[ Version ( since = "0.4.0-alpha" ) ]
public Future<Set<G>> to_set (owned HashDataFunc<G>? hash = null, owned EqualDataFunc<G>? equal = null)

Accumulates the elements into a new set.

There are no guarantees on the type, mutability, or thread-safety of the set.

This is equivalent to:

seq.collect( Collectors.to_set<G>(hash, equal) );

This is a terminal operation.

Parameters:

hash

a hash function. if not specified, Gee.Functions.get_hash_func_for is used to get a proper function

equal

an equal function. if not specified, Gee.Functions.get_equal_func_for is used to get a proper function

Returns:

a future of the result set

See also:

Collectors.to_set




2022 vala-language.org