Returns an immutable map containing the supplied key-value pairs in encounter order.
(K k1, V v1)
| 32 | * Returns an immutable map containing the supplied key-value pairs in encounter order. |
| 33 | */ |
| 34 | public static <K, V> Map<K, V> of(K k1, V v1) { |
| 35 | Map<K, V> map = new LinkedHashMap<K, V>(); |
| 36 | |
| 37 | map.put(k1, v1); |
| 38 | |
| 39 | return Collections.unmodifiableMap(map); |
| 40 | } |
| 41 | |
| 42 | /** |
| 43 | * Returns an immutable map containing the supplied key-value pairs in encounter order. |