Package io.vavr
Class API.For1Future<T1>
- java.lang.Object
-
- io.vavr.API.For1Future<T1>
-
- Enclosing class:
- API
public static class API.For1Future<T1> extends java.lang.Object
For-comprehension with one Future.
-
-
Constructor Summary
Constructors Modifier Constructor Description private
For1Future(Future<T1> ts1)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Future<T1>
yield()
A shortcut foryield(Function.identity())
.<R> Future<R>
yield(java.util.function.Function<? super T1,? extends R> f)
Yields a result for elements of the cross product of the underlying Future.
-
-
-
Method Detail
-
yield
public <R> Future<R> yield(java.util.function.Function<? super T1,? extends R> f)
Yields a result for elements of the cross product of the underlying Future.- Type Parameters:
R
- type of the resultingFuture
elements- Parameters:
f
- a function that maps an element of the cross product to a result- Returns:
- an
Future
of mapped results
-
-