|
|
@ -5,6 +5,8 @@ import com.fanruan.api.conf.impl.ObjectColConf; |
|
|
|
import com.fanruan.api.conf.impl.ObjectMapConf; |
|
|
|
import com.fanruan.api.conf.impl.ObjectMapConf; |
|
|
|
import com.fanruan.api.conf.impl.SimConf; |
|
|
|
import com.fanruan.api.conf.impl.SimConf; |
|
|
|
import com.fr.config.holder.Conf; |
|
|
|
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.Collection; |
|
|
|
import java.util.Map; |
|
|
|
import java.util.Map; |
|
|
@ -88,4 +90,14 @@ public class HolderKit { |
|
|
|
public static <K, V> ObjectMapConf<Map<K, V>> objMap(Map<K, V> map, Class<K> keyType, Class<V> valueType, boolean order) { |
|
|
|
public static <K, V> ObjectMapConf<Map<K, V>> objMap(Map<K, V> map, Class<K> keyType, Class<V> valueType, boolean order) { |
|
|
|
return new ObjectMapConf<>(map, keyType, valueType, order); |
|
|
|
return new ObjectMapConf<>(map, keyType, valueType, order); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* 创建一个collection类型的holder |
|
|
|
|
|
|
|
* @param collection 值Collection类型 |
|
|
|
|
|
|
|
* @param valueType 值class类型 |
|
|
|
|
|
|
|
* @return collection类型的holder |
|
|
|
|
|
|
|
* */ |
|
|
|
|
|
|
|
public static <K> ColConf<Collection<K>> collection(Collection<K> collection, Class<K> valueType) { |
|
|
|
|
|
|
|
return Holders.collection(collection, valueType); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|