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

jio.console.SupplierCommand Maven / Gradle / Ivy

There is a newer version: 3.0.0-RC2
Show newest version
package jio.console;

import jio.IO;
import jsonvalues.JsObj;

import java.util.function.Function;
import java.util.function.Supplier;

public class SupplierCommand extends Command {

  final Supplier supplier;

  public SupplierCommand(String name,
                         String description,
                         Supplier supplier
                        ) {
    super(name,
          description);
    this.supplier = supplier;
  }

  @Override
  public Function> apply(JsObj conf,
                                              State state
                                             ) {
    return tokens -> IO.lazy(supplier);
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy