
com.magictools.core.lang.loader.Loader 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.loader;
/**
* 对象加载抽象接口
* 通过实现此接口自定义实现对象的加载方式,例如懒加载机制、多线程加载等
*
* @author looly
*
* @param 对象类型
*/
@FunctionalInterface
public interface Loader {
/**
* 获取一个准备好的对象
* 通过准备逻辑准备好被加载的对象,然后返回。在准备完毕之前此方法应该被阻塞
*
* @return 加载完毕的对象
*/
T get();
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy