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

net.intelie.pipes.ModuleBuilder Maven / Gradle / Ivy

There is a newer version: 0.25.5
Show newest version
package net.intelie.pipes;

import net.intelie.pipes.types.Type;

import java.util.ArrayList;
import java.util.List;

public class ModuleBuilder {
    private final List functions = new ArrayList<>();

    public ModuleBuilder add(Function function) {
        this.functions.add(function);
        return this;
    }

    public ModuleBuilder addRaw(String name, Object value) {
        return add(new RawFunction(name, value));
    }

    public ModuleBuilder addValue(String name, Object value) {
        return add(new ValueFunction(name, value));
    }

    public ModuleBuilder addValue(String name, Type type, Object value) {
        return add(new ValueFunction(name, type, value));
    }

    public Module build() {
        return new ListModule(functions);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy