public static <K, V> void add(Map<K, V> map, Map<K, Set<V>> maps, int limit) {
		for (Entry<K, V> entry : map.entrySet()) {
			K key = entry.getKey();
			Set<V> set = maps.get(key);
			if (set == null) {
				set = new HashSet<V>();
				maps.put(key, set);
			}
			if (limit == -1 || set.size() < limit) {
				set.add(entry.getValue());
			}
		}
	}