code: public static <K, V, M extends Map<K, V>> M toMap(
        final Iterable<Pair<K, V>> pairs, final M map) {
      if (map == null) {
        throw new IllegalArgumentException("`map' must not be null.");
      }
      try {
        for (final Pair<K, V> pair : pairs) {
          map.put(pair.getFirst(), pair.getSecond());
        }
        return map;
      } catch (final Exception exc) {
        return null;
      }
    }
docs: Adds the pairs from the {@link Iterable} of pairs <code>(k, v)</code> to
  the given map.
  
  @since 1.0.0
  
  @param pairs
  The key/value pairs.
  @param map
  The map to add the key/value pairs to.
  @return The map.
  
  @throws IllegalArgumentException
  if the given Map is <code>null</code>.