E - type of element.public interface Scalar<E> extends Callable<E>
| Modifier and Type | Method and Description |
|---|---|
E |
call() |
void |
consume(Consumer<? super E> action)
Consume the result with the given
Consumer. |
CompletableFuture<E> |
toCompletableFuture() |
CompletableFuture<E> |
toCompletableFuture(Executor executor) |
Supplier<E> |
toSupplier() |
E |
value() |
E value()
void consume(Consumer<? super E> action)
Consumer.action - to receive the elements in this result.@CheckReturnValue CompletableFuture<E> toCompletableFuture()
CompletableFuture computing the result.@CheckReturnValue CompletableFuture<E> toCompletableFuture(Executor executor)
executor - to perform the operationCompletableFuture computing the result.@CheckReturnValue Supplier<E> toSupplier()
Supplier for the result of this query.