android/guava/src/com/google/common/collect/LinkedHashMultimap.java
public static <K, V> LinkedHashMultimap<K, V> create(
      Multimap<? extends K, ? extends V> multimap) {
    LinkedHashMultimap<K, V> result = create(multimap.keySet().size(), DEFAULT_VALUE_SET_CAPACITY);
    result.putAll(multimap);
    return result;
  }
public static <K, V> LinkedHashMultimap<K, V> create(
      Multimap<? extends K, ? extends V> multimap) {
    LinkedHashMultimap<K, V> result = create(multimap.keySet().size(), DEFAULT_VALUE_SET_CAPACITY);
    result.putAll(multimap);
    return result;
  }
Constructs a {@code LinkedHashMultimap} with the same mappings as the specified multimap. If a
key-value mapping appears multiple times in the input multimap, it only appears once in the
constructed multimap. The new multimap has the same {@link Multimap#entries()} iteration order
as the input multimap, except for excluding duplicate mappings.

@param multimap the multimap whose contents are copied to this multimap