LinkedHashMap<K, V>.fromEntries constructor

  1. @Since("2.1")
LinkedHashMap<K, V>.fromEntries(Iterable<MapEntry<K, V>> entries)

Creates a LinkedHashMap containing the entries of entries.

Returns a new LinkedHashMap<K, V> where all entries of entries have been added in iteration order.

If multiple entries have the same key, later occurrences overwrite the earlier ones.

Implementation

@Since("2.1")
factory LinkedHashMap.fromEntries(Iterable<MapEntry<K, V>> entries) =>
    <K, V>{}..addEntries(entries);