android/guava/src/com/google/common/collect/ImmutableMap.java
@Beta
  public static <K, V> ImmutableMap<K, V> copyOf(
      Iterable<? extends Entry<? extends K, ? extends V>> entries) {
    int initialCapacity =
        (entries instanceof Collection)
            ? ((Collection<?>) entries).size()
            : ImmutableCollection.Builder.DEFAULT_INITIAL_CAPACITY;
    ImmutableMap.Builder<K, V> builder = new ImmutableMap.Builder<K, V>(initialCapacity);
    builder.putAll(entries);
    return builder.build();
  }
@Beta
  public static <K, V> ImmutableMap<K, V> copyOf(
      Iterable<? extends Entry<? extends K, ? extends V>> entries) {
    int initialCapacity =
        (entries instanceof Collection)
            ? ((Collection<?>) entries).size()
            : ImmutableCollection.Builder.DEFAULT_INITIAL_CAPACITY;
    ImmutableMap.Builder<K, V> builder = new ImmutableMap.Builder<K, V>(initialCapacity);
    builder.putAll(entries);
    return builder.build();
  }
@ Beta public static < K , V > ImmutableMap < K , V > copyOf ( Iterable < ? extends Entry < ? extends K , ? extends V > > entries ) { int initialCapacity = ( entries instanceof Collection ) ? ( ( Collection < ? > ) entries ) . size ( ) : ImmutableCollection . Builder . DEFAULT_INITIAL_CAPACITY ; ImmutableMap . Builder < K , V > builder = new ImmutableMap . Builder < K , V > ( initialCapacity ) ; builder . putAll ( entries ) ; return builder . build ( ) ; }
Returns an immutable map containing the specified entries. The returned map iterates over
entries in the same order as the original iterable.

@throws NullPointerException if any key, value, or entry is null
@throws IllegalArgumentException if two entries have the same key
@since 19.0
Returns an immutable map containing the specified entries . The returned map iterates over entries in the same order as the original iterable .