Spring
ResourceUtils 加载文件 ResourceUtils.getFile(); (只可以加载文件系统文件,classpath作用表示类路径获取)StringUtils.commaDelimitedListToStringArray( StringUtils.trimAllWhitespace(this.basename) 分隔逗号
Properties 加载Properties
Resource 加载任意资源ClassPathResource、FileSystemResource
ClassLoader 类加载器 ClassUtils.getDefaultClassLoader();
DigestUtils.md5Hex(password) 算法
CollectionUtils.isEmpty()集合判断
Collectors收集器 StringEscapeUtils字符转义
Jre
判空
Objects.isNull();
简单集合
Collections.singleton("");
Collections.singletonList("");
Collections.singletonMap("");
Guava 不可变集合(Immu)
ImmutableSet.of("");
ImmutableList.of();
ImmutableBiMap.of();
Map
compute 执行
Absent 不存在的
Present 存在的
compute
Integer integer = map.compute("3", (k,v) -> v+1 );
compute通过Key可以交互前后Value
computeIfAbsent
不存在则执行,永远返回最终值
computeIfPresent
Key存在则操作Value
Collectors
toMap 转Map
toList 集合
joining 连接字符串
reducing 统计归纳
groupingBy 分组
partitioningBy 判断分组
minBy/maxBy 最小、最大值
summingDouble 求和
averagingDouble 平均值
summarizingDouble 数据分析汇总(结果的数量、和、最大值、最小值、平均值)