Enum Class PromiseHelper

java.lang.Object
java.lang.Enum<PromiseHelper>
org.smallibs.concurrent.promise.PromiseHelper
All Implemented Interfaces:
Serializable, Comparable<PromiseHelper>, java.lang.constant.Constable

public enum PromiseHelper extends Enum<PromiseHelper>
  • Method Details

    • values

      public static PromiseHelper[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static PromiseHelper valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • functor

      public static <T> Functor<Promise,T,Promise<T>> functor(Promise<T> promise)
    • applicative

      public static <T> Applicative<Promise,T,Promise<T>> applicative(Promise<T> promise)
    • monad

      public static <T> Monad<Promise,T,Promise<T>> monad(Promise<T> promise)
    • success

      public static <T> Promise<T> success(T t)
    • failure

      public static <T> Promise<T> failure(Throwable t)
    • join

      public static Promise<Unit> join(Promise... promises)
    • sequence

      public static <T> Promise<List<T>> sequence(List<Promise<T>> promises)
    • forall

      public static Promise<Unit> forall(Promise... promises)
    • exists

      public static Promise<Unit> exists(Promise... promises)