public class HerajFutures
extends java.lang.Object
Constructor and Description |
---|
HerajFutures() |
Modifier and Type | Method and Description |
---|---|
static <T> java.util.concurrent.Future<T> |
fail(java.lang.Throwable throwable) |
static <T> java.util.concurrent.Future<T> |
success(T value) |
static <T,R> java.util.concurrent.Future<R> |
transform(java.util.concurrent.Future<T> origin,
Function1<T,R> converter)
Transform Future of type T into Future of type R.
|
public static <T,R> java.util.concurrent.Future<R> transform(java.util.concurrent.Future<T> origin, Function1<T,R> converter)
T
- an origin type of futureR
- a transformed type of futureorigin
- an origin futureconverter
- a converter converting T to Rpublic static <T> java.util.concurrent.Future<T> success(T value)
public static <T> java.util.concurrent.Future<T> fail(java.lang.Throwable throwable)