public static class Eval.Module.FutureAlways<T> extends java.lang.Object implements Eval<T>
Eval.CompletableEval<ORG,T2>, Eval.Instances, Eval.ModuleValue.ValueImpl<T>Convertable.SupplierToConvertable<T>Fn0.FunctionalOperations<R>, Fn0.SupplierKind<R>| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object obj) |
<R> Eval<R> |
flatMap(java.util.function.Function<? super T,? extends MonadicValue<? extends R>> mapper)
A flattening transformation operation (@see
Optional.flatMap(Function) |
void |
forEach(java.util.function.Consumer<? super T> cons) |
ReactiveSeq<T> |
generate() |
T |
get() |
int |
hashCode() |
ReactiveSeq<T> |
iterate(java.util.function.UnaryOperator<T> fn)
Use the value stored in this Value to seed a Stream generated from the provided function
|
<R> Eval<R> |
map(java.util.function.Function<? super T,? extends R> mapper)
Transform this functor using the supplied transformation function
|
void |
subscribe(org.reactivestreams.Subscriber<? super T> sub) |
java.util.concurrent.CompletableFuture<T> |
toCompletableFuture() |
java.util.concurrent.CompletableFuture<T> |
toCompletableFutureAsync(java.util.concurrent.Executor exec) |
Eval<T> |
toEvalAlways()
Return the value of this object, evaluated always.
|
Future<T> |
toFuture() |
Future<T> |
toFutureAsync(java.util.concurrent.Executor ex)
This convertable converted to a Future asyncrhonously using the supplied Executor
|
java.lang.String |
toString() |
<T> Eval<T> |
unit(T unit) |
clone, finalize, getClass, notify, notifyAll, wait, wait, waitaccumulate, accumulate, accumulate, allTypeclasses, always, anyM, async, cast, coeval, coflatMap, combine, combineEager, coproduct, defer, eval, filter, filterNot, flatMapI, flatMapP, flatMapS, forEach2, forEach2, forEach3, forEach3, forEach4, forEach4, fromFuture, fromIterable, fromPublisher, kindCokleisli, kindKleisli, later, liftM, mapM, narrow, narrowK, nest, nested, notNull, now, ofType, peek, product, retry, retry, sequence, sequence, steps, toMaybe, toTrampoline, trampoline, visit, widen, zip, zip, zip, zip3, zip3, zip4, zip4, zipP, zipP, zipS, zipS, zipWith, zipWithP, zipWithSarityapply, iterator, mkString, newSubscriber, of, stream, test, toEither, toEval, toEvalLater, toEvalNow, toIor, toLeft, toMaybeEager, toRight, toTry, toTry, toTry, toXor, toXorendsWith, endsWithIterable, findAny, findFirst, firstValue, foldLeft, foldLeft, foldLeft, foldLeft, foldRight, foldRight, foldRight, foldRightMapToType, get, groupBy, join, join, join, mapReduce, mapReduce, print, print, printErr, printOut, reduce, reduce, reduce, reduce, reduce, reduce, reduce, schedule, scheduleFixedDelay, scheduleFixedRate, single, single, singleUnsafe, startsWith, startsWithIterable, takeOne, xMatchcollect, fromSupplier, isPresent, orElse, orElseGet, orElseThrow, toOptional, toStreampublic void forEach(java.util.function.Consumer<? super T> cons)
forEach in interface java.lang.Iterable<T>public <R> Eval<R> map(java.util.function.Function<? super T,? extends R> mapper)
Transformable
of(1,2,3).map(i->i*2)
//[2,4,6]
map in interface Transformable<T>map in interface MonadicValue<T>map in interface Eval<T>mapper - Transformation functionpublic <R> Eval<R> flatMap(java.util.function.Function<? super T,? extends MonadicValue<? extends R>> mapper)
MonadicValueOptional.flatMap(Function)
Eval.now(1).map(i->i+2).flatMap(i->Eval.later(()->i*3);
//Eval[9]
public ReactiveSeq<T> iterate(java.util.function.UnaryOperator<T> fn)
Valuepublic ReactiveSeq<T> generate()
public Future<T> toFuture()
toFuture in interface Convertable<T>public Future<T> toFutureAsync(java.util.concurrent.Executor ex)
toFutureAsync in interface Convertable<T>ex - Executor to execute the conversion onpublic java.util.concurrent.CompletableFuture<T> toCompletableFuture()
toCompletableFuture in interface Convertable<T>public java.util.concurrent.CompletableFuture<T> toCompletableFutureAsync(java.util.concurrent.Executor exec)
toCompletableFutureAsync in interface Convertable<T>exec - Executor to asyncrhonously populate the CompletableFuturepublic final void subscribe(org.reactivestreams.Subscriber<? super T> sub)
public T get()
public <T> Eval<T> unit(T unit)
public Eval<T> toEvalAlways()
ValuetoEvalAlways in interface Value<T>public int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Object