@Test public void testNewTreeMap() { Map<String, Object> map = MapUtil.newTreeMap(); assertEquals(map.size(), 0); map.put("a", 1); assertEquals(map.size(), 1); }
public static <K, V> TreeMap<K, V> newTreeMap() { return new TreeMap<>(); }
MapUtil { public static <K, V> TreeMap<K, V> newTreeMap() { return new TreeMap<>(); } }
MapUtil { public static <K, V> TreeMap<K, V> newTreeMap() { return new TreeMap<>(); }  }
MapUtil { public static <K, V> TreeMap<K, V> newTreeMap() { return new TreeMap<>(); }  static Map<K, V> newHashMap(); static Map<K, V> newHashMap(int initialCapacity); static Map<K, V> newHashMap(int initialCapacity, float loadFactor); static Map<K, V> newHashMap(Map<? extends K, ? extends V> m); @SafeVarargs static Map<K, V> buildHashMap(V... values); @SuppressWarnings("rawtypes") static Class<? extends Map> getHashMapClass(); static Map<K, V> newLinkedHashMap(); static Map<K, V> newLinkedHashMap(int initialCapacity); static Map<K, V> newLinkedHashMap(Map<? extends K, ? extends V> m); @SafeVarargs static Map<K, V> buildLinkedHashMap(V... values); @SuppressWarnings("rawtypes") static Class<? extends Map> getLinkedHashMapClass(); static Map<K, V> newIdentityHashMap(); static Map<K, V> newIdentityHashMap(int initialCapacity); static Map<K, V> newIdentityHashMap(Map<? extends K, ? extends V> m); @SuppressWarnings("rawtypes") static Class<? extends Map> getIdentityHashMapClass(); @SafeVarargs static Map<K, V> buildIdentityHashMap(V... values); static TreeMap<K, V> newTreeMap(); static TreeMap<K, V> newTreeMap(Comparator<? super K> comparator); static TreeMap<K, V> newTreeMap(Map<? extends K, ? extends V> m); static TreeMap<K, V> newTreeMap(SortedMap<K, ? extends V> m); @SafeVarargs static TreeMap<K, V> buildTreeMap(V... values); @SuppressWarnings("rawtypes") static Class<? extends TreeMap> getTreeMapClass(); static Hashtable<K, V> newHashtable(); static Hashtable<K, V> newHashtable(int initialCapacity); static Hashtable<K, V> newHashtable(Map<? extends K, ? extends V> m); @SafeVarargs static Hashtable<K, V> buildHashtable(V... values); @SuppressWarnings("rawtypes") static Class<? extends Hashtable> getHashtableClass(); static Map<E, E> arrayToMap(E[][] array); static boolean isEmpty(Map<?, ?> map); }
MapUtil { public static <K, V> TreeMap<K, V> newTreeMap() { return new TreeMap<>(); }  static Map<K, V> newHashMap(); static Map<K, V> newHashMap(int initialCapacity); static Map<K, V> newHashMap(int initialCapacity, float loadFactor); static Map<K, V> newHashMap(Map<? extends K, ? extends V> m); @SafeVarargs static Map<K, V> buildHashMap(V... values); @SuppressWarnings("rawtypes") static Class<? extends Map> getHashMapClass(); static Map<K, V> newLinkedHashMap(); static Map<K, V> newLinkedHashMap(int initialCapacity); static Map<K, V> newLinkedHashMap(Map<? extends K, ? extends V> m); @SafeVarargs static Map<K, V> buildLinkedHashMap(V... values); @SuppressWarnings("rawtypes") static Class<? extends Map> getLinkedHashMapClass(); static Map<K, V> newIdentityHashMap(); static Map<K, V> newIdentityHashMap(int initialCapacity); static Map<K, V> newIdentityHashMap(Map<? extends K, ? extends V> m); @SuppressWarnings("rawtypes") static Class<? extends Map> getIdentityHashMapClass(); @SafeVarargs static Map<K, V> buildIdentityHashMap(V... values); static TreeMap<K, V> newTreeMap(); static TreeMap<K, V> newTreeMap(Comparator<? super K> comparator); static TreeMap<K, V> newTreeMap(Map<? extends K, ? extends V> m); static TreeMap<K, V> newTreeMap(SortedMap<K, ? extends V> m); @SafeVarargs static TreeMap<K, V> buildTreeMap(V... values); @SuppressWarnings("rawtypes") static Class<? extends TreeMap> getTreeMapClass(); static Hashtable<K, V> newHashtable(); static Hashtable<K, V> newHashtable(int initialCapacity); static Hashtable<K, V> newHashtable(Map<? extends K, ? extends V> m); @SafeVarargs static Hashtable<K, V> buildHashtable(V... values); @SuppressWarnings("rawtypes") static Class<? extends Hashtable> getHashtableClass(); static Map<E, E> arrayToMap(E[][] array); static boolean isEmpty(Map<?, ?> map);  }