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

com.kg.component.generator.config.converts.select.Branch Maven / Gradle / Ivy

There is a newer version: 1.1.26
Show newest version
package com.kg.component.generator.config.converts.select;

import java.util.function.Function;
import java.util.function.Predicate;

/**
 * 分支提供者
 *
 * @author hanchunlin
 * Created at 2020/6/11 17:19
 * @see BranchBuilder
 */
public interface Branch {

    /**
     * @return 分支进入条件
     */
    Predicate

tester(); /** * @return 值工厂 */ Function factory(); /** * 工厂方法,快速创建分支 * * @param tester 测试器 * @param factory 值工厂 * @param

参数类型 * @param 值类型 * @return 返回一个新的分支 */ static Branch of(Predicate

tester, Function factory) { return new Branch() { @Override public Predicate

tester() { return tester; } @Override public Function factory() { return factory; } }; } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy