private static <K, V> Set<V> getMapSet(final Map<K, Set<V>> map, final K key) {
        Set<V> set = map.get(key);
        if (set == null) {
            set = new LinkedHashSet<>();
            map.put(key, set);
        }
        return set;
    }
A number of static methods to interact with a multi map, i.e. a map that maps keys to sets of values.

@author Matthias Broecheler (me@matthiasb.com)
gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/util/MultiMap.java