mirror of
https://github.com/YunaiV/ruoyi-vue-pro.git
synced 2026-05-10 23:54:38 +00:00
23 lines
421 B
Java
23 lines
421 B
Java
package cn.iocoder.dashboard.util.object;
|
|
|
|
import cn.hutool.core.util.ObjectUtil;
|
|
|
|
import java.util.function.Consumer;
|
|
|
|
/**
|
|
* Object 工具类
|
|
*
|
|
* @author 芋道源码
|
|
*/
|
|
public class ObjectUtils {
|
|
|
|
public static <T> T clone(T object, Consumer<T> consumer) {
|
|
T result = ObjectUtil.clone(object);
|
|
if (result != null) {
|
|
consumer.accept(result);
|
|
}
|
|
return result;
|
|
}
|
|
|
|
}
|