Class Tasks

java.lang.Object
org.kinotic.continuum.grind.api.Tasks

public class Tasks extends Object
Created by Navid Mitchell on 3/24/20
  • Constructor Details

    • Tasks

      public Tasks()
  • Method Details

    • fromCallable

      public static <R> Task<R> fromCallable(Callable<R> instance)
    • fromCallable

      public static <R> Task<R> fromCallable(String description, Callable<R> instance)
    • fromExec

      public static Task<String> fromExec(String description, String... command)
    • fromSupplier

      public static <R> Task<R> fromSupplier(Supplier<R> instance)
    • fromSupplier

      public static <R> Task<R> fromSupplier(String description, Supplier<R> instance)
    • fromValue

      public static <T> Task<T> fromValue(T value)
    • fromValue

      public static <T> Task<T> fromValue(String description, T value)
    • fromRunnable

      public static Task<Void> fromRunnable(Runnable instance)
    • fromRunnable

      public static Task<Void> fromRunnable(String description, Runnable instance)
    • noop

      public static <T> Task<T> noop(String description)
      Special type of task that allows a step to be skipped if needed. This is useful if a Supplier<Task> needs to only supply a task under certain conditions
      Parameters:
      description - of why the task is a noop task.
      Returns:
      the noop task
    • noop

      public static <T> Task<T> noop()
      Special type of task that allows a step to be skipped if needed. This is useful if a Supplier<Task> needs to only supply a task under certain conditions
      Returns:
      the noop task
    • transformResult

      public static <T, R> Task<R> transformResult(Task<T> from, Function<T,R> transformer)