| Package | Description |
|---|---|
| org.dromara.hutool.core.collection |
集合以及Iterator封装,包括集合工具CollUtil,Iterator和Iterable工具IterUtil
|
| org.dromara.hutool.core.collection.iter | |
| org.dromara.hutool.core.func |
函数封装
接口灵感来自于ActFramework 一个函数接口代表一个一个函数,用于包装一个函数为对象 在JDK8之前,Java的函数并不能作为参数传递,也不能作为返回值存在,此接口用于将一个函数包装成为一个对象,从而传递对象 |
| org.dromara.hutool.core.tree |
提供通用树生成,特点:
1、每个字段可自定义
2、支持排序 树深度配置,自定义转换器等 3、支持额外属性扩展 4、贴心 许多属性,特性都有默认值处理 5、使用简单 可一行代码生成树 6、代码简洁轻量无额外依赖 |
| Modifier and Type | Method and Description |
|---|---|
static <T> void |
CollUtil.forEach(Enumeration<T> enumeration,
SerBiConsumer<Integer,T> consumer)
循环遍历
Enumeration,使用SerBiConsumer 接受遍历的每条数据,并针对每条数据做处理 |
static <T> void |
CollUtil.forEach(Iterable<T> iterable,
SerBiConsumer<Integer,T> consumer)
循环遍历
Iterable,使用SerBiConsumer 接受遍历的每条数据,并针对每条数据做处理 |
static <T> void |
CollUtil.forEach(Iterator<T> iterator,
SerBiConsumer<Integer,T> consumer)
循环遍历
Iterator,使用SerBiConsumer 接受遍历的每条数据,并针对每条数据做处理 |
| Modifier and Type | Method and Description |
|---|---|
static <T> void |
IterUtil.indexForEach(Iterator<T> iterator,
SerBiConsumer<Integer,T> consumer)
循环遍历
Iterator,使用SerBiConsumer 接受遍历的每条数据,并针对每条数据做处理,支持index |
| Modifier and Type | Method and Description |
|---|---|
default SerBiConsumer<T,U> |
SerBiConsumer.andThen(SerBiConsumer<? super T,? super U> after)
Returns a composed
SerBiCons that performs, in sequence, this
operation followed by the after operation. |
static <T,U> SerBiConsumer<T,U> |
SerBiConsumer.multi(SerBiConsumer<T,U>... consumers)
multi
|
static <T,U> SerBiConsumer<T,U> |
SerBiConsumer.nothing()
什么也不做,用于一些需要传入lambda的方法占位使用
|
| Modifier and Type | Method and Description |
|---|---|
default SerBiConsumer<T,U> |
SerBiConsumer.andThen(SerBiConsumer<? super T,? super U> after)
Returns a composed
SerBiCons that performs, in sequence, this
operation followed by the after operation. |
static <T,U> SerBiConsumer<T,U> |
SerBiConsumer.multi(SerBiConsumer<T,U>... consumers)
multi
|
| Modifier and Type | Method and Description |
|---|---|
static <T,R extends Comparable<R>> |
BeanTree.of(SerFunction<T,R> idGetter,
SerFunction<T,R> pidGetter,
R pidValue,
SerFunction<T,List<T>> childrenGetter,
SerBiConsumer<T,List<T>> childrenSetter)
构建BeanTree
|
static <T,R extends Comparable<R>> |
BeanTree.ofMatch(SerFunction<T,R> idGetter,
SerFunction<T,R> pidGetter,
SerPredicate<T> parentPredicate,
SerFunction<T,List<T>> childrenGetter,
SerBiConsumer<T,List<T>> childrenSetter)
构建BeanTree
|
Copyright © 2025. All rights reserved.