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

com.github.yulichang.wrapper.segments.FuncConsumer Maven / Gradle / Ivy

There is a newer version: 1.5.2
Show newest version
package com.github.yulichang.wrapper.segments;

import com.baomidou.mybatisplus.core.toolkit.support.SFunction;
import lombok.Data;

/**
 * 用于selectFunc 和 applyFunc中的参数填充
 * 从原来的 {@link SelectFunc} 里的内部类中提取出来
 *
 * @author yulichang
 * @since 1.4.13
 */
@Data
public class FuncConsumer {

    private SFunction[] args;

    private Object[] values;

    public final  FuncConsumer accept(SFunction a) {
        this.args = new SFunction[]{a};
        return this;
    }

    public final  FuncConsumer accept(SFunction a, SFunction b) {
        this.args = new SFunction[]{a, b};
        return this;
    }

    public final  FuncConsumer accept(SFunction a, SFunction b, SFunction c) {
        this.args = new SFunction[]{a, b, c};
        return this;
    }

    public final  FuncConsumer accept(SFunction a, SFunction b, SFunction c, SFunction d) {
        this.args = new SFunction[]{a, b, c, d};
        return this;
    }

    public final  FuncConsumer accept(SFunction a, SFunction b, SFunction c, SFunction d, SFunction e) {
        this.args = new SFunction[]{a, b, c, d, e};
        return this;
    }

    public final  FuncConsumer accept(SFunction a, SFunction b, SFunction c, SFunction d, SFunction e, SFunction f) {
        this.args = new SFunction[]{a, b, c, d, e, f};
        return this;
    }

    public final  FuncConsumer accept(SFunction a, SFunction b, SFunction c, SFunction d, SFunction e, SFunction f, SFunction g) {
        this.args = new SFunction[]{a, b, c, d, e, f, g};
        return this;
    }

    public final  FuncConsumer accept(SFunction a, SFunction b, SFunction c, SFunction d, SFunction e, SFunction f, SFunction g, SFunction h) {
        this.args = new SFunction[]{a, b, c, d, e, f, g, h};
        return this;
    }

    public final  FuncConsumer accept(SFunction a, SFunction b, SFunction c, SFunction d, SFunction e, SFunction f, SFunction g, SFunction h, SFunction i) {
        this.args = new SFunction[]{a, b, c, d, e, f, g, h, i};
        return this;
    }

    public final  FuncConsumer accept(SFunction a, SFunction b, SFunction c, SFunction d, SFunction e, SFunction f, SFunction g, SFunction h, SFunction i, SFunction j) {
        this.args = new SFunction[]{a, b, c, d, e, f, g, h, i, j};
        return this;
    }


    public final FuncConsumer values(Object... values) {
        this.values = values;
        return this;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy