
com.magictools.core.bean.copier.AbsCopier Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of magic-tools-all Show documentation
Show all versions of magic-tools-all Show documentation
magic-tools 是一个小而全的Java工具类库,通过静态方法封装,降低相关API的学习成本,提高工作效率,使Java拥有函数式语言般的优雅,让Java语言也可以“甜甜的”。
The newest version!
package com.magictools.core.bean.copier;
import com.magictools.core.lang.copier.Copier;
import com.magictools.core.util.ObjectUtil;
/**
* 抽象的对象拷贝封装,提供来源对象、目标对象持有
*
* @param 来源对象类型
* @param 目标对象类型
* @author looly
* @since 5.8.0
*/
public abstract class AbsCopier implements Copier {
protected final S source;
protected final T target;
/**
* 拷贝选项
*/
protected final CopyOptions copyOptions;
public AbsCopier(S source, T target, CopyOptions copyOptions) {
this.source = source;
this.target = target;
this.copyOptions = ObjectUtil.defaultIfNull(copyOptions, CopyOptions::create);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy