
com.magictools.core.lang.intern.Interner 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.intern;
/**
* 规范化表示形式封装
* 所谓规范化,即当两个对象equals时,规范化的对象则可以实现==
* 此包中的相关封装类似于 {@link String#intern()}
*
* @param 规范化的对象类型
* @author looly
* @since 5.4.3
*/
public interface Interner {
/**
* 返回指定对象对应的规范化对象,sample对象可能有多个,但是这些对象如果都equals,则返回的是同一个对象
*
* @param sample 对象
* @return 样例对象
*/
T intern(T sample);
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy