Returns an immutable map whose keys are the distinct elements of {@code keys} and whose value for each key was computed by {@code valueFunction}. The map's iteration order is the order of the first appearance of each key in {@code keys}. <p>When there are multiple instances of a key in {@code keys}
(
Iterable<K> keys, Function<? super K, V> valueFunction)
| 1253 | * @since 14.0 |
| 1254 | */ |
| 1255 | public static <K, V> ImmutableMap<K, V> toMap( |
| 1256 | Iterable<K> keys, Function<? super K, V> valueFunction) { |
| 1257 | return toMap(keys.iterator(), valueFunction); |
| 1258 | } |
| 1259 | |
| 1260 | /** |
| 1261 | * Returns an immutable map whose keys are the distinct elements of {@code keys} and whose value |