From 1e8dd0e3d9bc1eccfb70f0eb6702b47c76434da5 Mon Sep 17 00:00:00 2001 From: zjz1993 <1429595365@qq.com> Date: Fri, 6 Sep 2019 15:35:37 +0800 Subject: [PATCH] =?UTF-8?q?update:=20=E6=96=B0=E5=A2=9E=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/com/fanruan/api/conf/HolderKit.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/main/java/com/fanruan/api/conf/HolderKit.java b/src/main/java/com/fanruan/api/conf/HolderKit.java index 6268e47..6e9c709 100644 --- a/src/main/java/com/fanruan/api/conf/HolderKit.java +++ b/src/main/java/com/fanruan/api/conf/HolderKit.java @@ -5,6 +5,8 @@ import com.fanruan.api.conf.impl.ObjectColConf; import com.fanruan.api.conf.impl.ObjectMapConf; import com.fanruan.api.conf.impl.SimConf; import com.fr.config.holder.Conf; +import com.fr.config.holder.factory.Holders; +import com.fr.config.holder.impl.ColConf; import java.util.Collection; import java.util.Map; @@ -88,4 +90,14 @@ public class HolderKit { public static ObjectMapConf> objMap(Map map, Class keyType, Class valueType, boolean order) { return new ObjectMapConf<>(map, keyType, valueType, order); } + + /** + * 创建一个collection类型的holder + * @param collection 值Collection类型 + * @param valueType 值class类型 + * @return collection类型的holder + * */ + public static ColConf> collection(Collection collection, Class valueType) { + return Holders.collection(collection, valueType); + } }