Java tutorial
//package com.java2s; //License from project: Open Source License import java.util.LinkedHashMap; import java.util.Map; public class Main { /** * it returns an ordered Map implementation * * @return */ public static <T, D> Map<T, D> newOrderedMap() { return new LinkedHashMap<>(); } /** * it returns an ordered Map implementation with the specified initial capacity * * @return */ public static <T, D> Map<T, D> newOrderedMap(int initialCapacity) { return new LinkedHashMap<>(initialCapacity); } }