All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.moesif.helpers.CollectionUtils Maven / Gradle / Ivy

There is a newer version: 1.2.0
Show newest version
package com.moesif.helpers;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

public class CollectionUtils {

    public static  Map flattenMultiMap(Map> multiMap) {
        Map result = new HashMap<>();
        for (Map.Entry> entry : multiMap.entrySet()) {
            for (V value : entry.getValue()) {
                result.put(entry.getKey(), value);
            }
        }
        return result;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy