feilong-core 1.12.0 发布了,feilong-core 是一个让 Java 开发更简便的工具包。
让你从大量重复的底层代码中脱身,提高工作效率;
让你的代码更简炼,易写、易读、易于维护;
文档地址: http://feilong-core.mydoc.io/
单元测试数 增加至 2045 个, 单元测试覆盖率 增加至 91% ,javadoc 比率 83%
本次升级共有 7 处变更, 具体参见 1.12.0 milestone
#645 大幅度提高 CollectionsUtil.getPropertyValueList 性能
对于以下user list
List<User> list = buildUser(1000);
private static final List<User> buildUser(int size){
List<User> returnList = newArrayList();
for (int i = 0, j = size; i < j; ++i){
returnList.add(new User("张三" + i, i));
}
return returnList;
}
现在要取到每个user 的age ,组成list集合返回,直接调用
List<Integer> ageList = CollectionsUtil.getPropertyValueList(list, "age");
1.12.0 VS 1.11.5 性能对比
在循环 50000 次 , 1.12.0 速度上提升了 20 倍
#755 CollectionsUtil.getPropertyValueSet(Iterable<O>, String) 初始化set 大小
#754 CollectionsUtil.getPropertyValueList(Iterable<O>, String) 初始化 list大小
commons-collections4 升级到 4.2 :arrow_up:
none
none
#759 完善 BeanUtil javadoc
#758 完善 CollectionsUtil.getPropertyValueSet(Iterable<O>, String) javadoc ,增加对 beanIterable 的说明
#757 完善 CollectionsUtil.getPropertyValueList(Iterable<O>, String) javadoc ,增加对 beanIterable 的说明
#756 添加 GetPropertyValueListPropertyNameTest 单元测试类