
com.magictools.core.lang.Editor 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.lang;
/**
* 编辑器接口,常用于对于集合中的元素做统一编辑
* 此编辑器两个作用:
*
*
* 1、如果返回值为{@code null},表示此值被抛弃
* 2、对对象做修改
*
*
* @param 被编辑对象类型
* @author Looly
*/
@FunctionalInterface
public interface Editor {
/**
* 修改过滤后的结果
*
* @param t 被过滤的对象
* @return 修改后的对象,如果被过滤返回{@code null}
*/
T edit(T t);
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy