static void putAllCollections(Map<Class<?>, IntFunction<?>> map, Map<Class<?>, Function<?, ?>> unmodMap)
{
safePut(map, ArrayList.class, ArrayList::new);
safePut(map, HashSet.class, LinkedHashSet::new);
safePut(map, Properties.class, x -> new Properties());
safePut(map, Hashtable.class, Hashtable::new);
safePut(map, Collection.class, ArrayList::new);
safePut(map, Set.class, LinkedHashSet::new);
safePut(map, List.class, ArrayList::new);
safePut(map, SortedSet.class, x -> new TreeSet<>());
safePut(map, Queue.class, x -> new ConcurrentLinkedQueue<>());
safePut(map, Deque.class, x -> new ConcurrentLinkedDeque<>());
safePut(map, BlockingQueue.class, x -> new LinkedBlockingQueue<>());
safePut(map, BlockingDeque.class, x -> new LinkedBlockingDeque<>());
safePut(map, HashMap.class, LinkedHashMap::new);
safePut(map, LinkedHashMap.class, LinkedHashMap::new);
safePut(map, ConcurrentHashMap.class, ConcurrentHashMap::new);
safePut(map, Map.class, LinkedHashMap::new);
safePut(map, ConcurrentMap.class, x -> new ConcurrentSkipListMap<>());
safePut(map, ConcurrentNavigableMap.class, x -> new ConcurrentSkipListMap<>());
safePut(map, SortedMap.class, i -> new TreeMap<>());
}
YamlCollectionCreator.java 文件源码
java
阅读 45
收藏 0
点赞 0
评论 0
项目:diorite-configs-java8
作者:
评论列表
文章目录