JDK工具类之java.util.function包的源码学习

依赖关系

luogw@luogw-mbp function$ ag 'import ' | awk 'BEGIN{FS=":"} {print $3}' | awk 'BEGIN{FS=" "} {print $2}' | awk 'BEGIN{FS=";"} {print $1}' | sort -u
java.util.Comparator
java.util.Objects

通过import的关系,可知function依赖接口Comparator与Objects类
Objects类的职责是

This class consists of static utility methods for operating on objects. These utilities include null-safe or null-tolerant methods for computing the hash code of an object, returning a string for an object, and comparing two objects.

内部实现

猜你喜欢

转载自blog.csdn.net/scholar_ii/article/details/80822342