utils包需要关注的主要有
集合框架、并发包、函数式编程、观察者模式@see PropertyChangeSupport
java.util(集合框架)
Contains the collections framework, legacy collection classes, event model, date and time facilities, internationalization, and miscellaneous utility classes (a string tokenizer, a random-number generator, and a bit array).
包含集合框架、遗留集合类、事件模型、日期和时间工具、国际化和杂项实用程序类(字符串记号赋予器、随机数生成器和位数组)。
java.util.concurrent (并发包 、 原子类、锁)
Utility classes commonly useful in concurrent programming.
java.util.concurrent.atomic A small toolkit of classes that support lock-free thread-safe programming on single variables.
java.util.concurrent.locks Interfaces and classes providing a framework for locking and waiting for conditions that is distinct from built-in synchronization and monitors.
java.util.function (函数式编程)
Functional interfaces provide target types for lambda expressions and method references.
There are several basic function shapes, including Function
(unary function from T
to R
), Consumer
(unary function from T
to void
) 大专栏 JDK_Packages_java_utils, Predicate
(unary function from T
to boolean
), and Supplier
(nilary function to R
).
java.util.stream(流式编程)
Classes to support functional-style operations on streams of elements, such as map-reduce transformations on collections.
类来支持元素流上的函数式操作,例如集合上的映射-reduce转换。
java.util.logging(日志)
Provides the classes and interfaces of the JavaTM 2 platform’s core logging facilities.
java.util.prefs
This package allows applications to store and retrieve user and system preference and configuration data.
这个包允许应用程序存储和检索用户和系统首选项以及配置数据。
java.util.regex
Classes for matching character sequences against patterns specified by regular expressions.
用于根据正则表达式指定的模式匹配字符序列的类。
java.util.spi
Service provider classes for the classes in the java.util package.
用于java中的类的服务提供程序类
java.util.zip(读写zip)
Provides classes for reading and writing the standard ZIP and GZIP file formats.
java.util.jar(jar包工具)
Provides classes for reading and writing the JAR (Java ARchive) file format, which is based on the standard ZIP file format with an optional manifest file.