From 9a078396cde9740c1b841b82978be43ffa82ffe8 Mon Sep 17 00:00:00 2001 From: ZhouXY108 Date: Wed, 28 Jun 2023 01:29:37 +0800 Subject: [PATCH] fix bugs. --- .../java/xyz/zhouxy/plusone/commons/util/MoreCollections.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/xyz/zhouxy/plusone/commons/util/MoreCollections.java b/src/main/java/xyz/zhouxy/plusone/commons/util/MoreCollections.java index 5ad4142..1efca6a 100644 --- a/src/main/java/xyz/zhouxy/plusone/commons/util/MoreCollections.java +++ b/src/main/java/xyz/zhouxy/plusone/commons/util/MoreCollections.java @@ -60,7 +60,7 @@ public class MoreCollections { return toConcurrentHashMap(c, keyGenerator, c.size()); } - public static TreeMap toTreeMap(Iterable c, Function keyGenerator) { + public static , V> TreeMap toTreeMap(Iterable c, Function keyGenerator) { TreeMap map = new TreeMap<>(); fillIntoEmptyMap(map, c, keyGenerator); return map; @@ -106,7 +106,7 @@ public class MoreCollections { return toConcurrentHashMap(c, keyGenerator, c.length); } - public static TreeMap toTreeMap(V[] c, Function keyGenerator) { + public static , V> TreeMap toTreeMap(V[] c, Function keyGenerator) { TreeMap map = new TreeMap<>(); fillIntoEmptyMap(map, c, keyGenerator); return map;