新增peeks函数,为函数式编程提供多样性和更多可能性

This commit is contained in:
achao 2021-10-30 14:53:08 +08:00
parent 6a0bfb7994
commit d1a16d94ae

View File

@ -270,9 +270,9 @@ public class Opt<T> {
* <p>属于 {@link #ifPresent}的链式拓展
* <p>属于 {@link #peek(Consumer)}的动态拓展
*
* @param actions 值存在时执行的操作动态参数可传入数组当数组为空数组时并不会抛出 {@code NPE}
* @param actions 值存在时执行的操作动态参数可传入数组当数组为一个空数组时并不会抛出 {@code NPE}
* @return this
* @throws NullPointerException 如果值存在并且传入的操作 {@code null}
* @throws NullPointerException 如果值存在并且传入的操作集中的元素 {@code null}
* @author VampireAchao
*/
@SafeVarargs