public static <T, K, U>
    Collector<T, ?, Map<K,U>> toLinkedMap(Function<? super T, ? extends K> keyMapper,
                                          Function<? super T, ? extends U> valueMapper) {
        return Collectors.toMap(keyMapper, valueMapper, throwingMerger(), LinkedHashMap::new);
    }
Returns a {@code Collector} that accumulates elements into a {@code Map}
that provides insertion order iteration. This a convenience that can be used
instead of calling {@link java.util.stream.Collectors#toMap(Function, Function, BinaryOperator, Supplier)}.
with a merger that throws upon duplicate keys.

@param keyMapper Mapping function to produce keys.
@param valueMapper Mapping function to produce values.
@param <T> Type of the input elements.
@param <K> Output type of the key mapping function.
@param <U> Output type of the value mapping function.
@return A collector which collects elements into a map with insertion order iteration.
@throws DuplicateKeyException If two elements map to the same key.
vespajlib/src/main/java/com/yahoo/stream/CustomCollectors.java