All Downloads are FREE. Search and download functionalities are using the official Maven repository.

top.jfunc.common.ChainCall Maven / Gradle / Ivy

There is a newer version: 1.8.5
Show newest version
package top.jfunc.common;

/**
 * 提供返回this的方法,便于在多级继承的时候实现真正的方法连缀
 * 这个接口一般用在接口或者抽象类中,具体实体类一般不需要,避免引入额外的复杂性
 * @author xiongshiyan
 */
public interface ChainCall {
    /**
     * 返回自己便于方法连缀
     * @return this
     */
    @SuppressWarnings("unchecked")
    default THIS myself(){
        return (THIS)this;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy