filter


Description:

public static HashMap<K,V> filter<K,V> (HashMap<K,V> map, owned BiPredicateFunc<K,V> fn, HashFunc<K> hash_func, EqualFunc<K> equal_func)

Returns a new map containing only entries that match the predicate.

Parameters:

map

the source map.

fn

predicate taking key and value.

hash_func

hash function for key type K.

equal_func

equality function for key type K.

Returns:

a new filtered map.