Beispiel #1
0
        internal static Map <K, V2> eagerMapValues <K, V1, V2>(Map <K, V1> map, Function <V1, V2> function)
        {
            var dictionary = FromJava.MapToDictionary(map)
                             .ToDictionary(
                entry => entry.Key,
                entry => function.apply(entry.Value));

            return(ToJava.DictionaryToMap(dictionary));
        }
Beispiel #2
0
        internal static Map <K2, V> eagerMapKeys <K1, K2, V>(Map <K1, V> map, Function <K1, K2> function)
        {
            var dictionary = FromJava.MapToDictionary(map)
                             .ToDictionary(
                entry => function.apply(entry.Key),
                entry => entry.Value);

            return(ToJava.DictionaryToMap(dictionary));
        }