public final class AwtUtils extends Object
| Modifier and Type | Method and Description |
|---|---|
static <RES> CompletionStage<RES> |
asyncAwtCallback(Supplier<RES> awtOperation)
Performs a computation that returns an object asynchronously.
|
static <RES,REQ> CompletionStage<RES> |
asyncAwtCallbackWithRequirement(Supplier<REQ> requirement,
Function<REQ,RES> awtOperation)
Same as
asyncAwtCallback(Supplier) except that it performs a 2-steps operation. |
static <REQ> CompletionStage<Void> |
asyncAwtRunnableWithRequirement(Supplier<REQ> requirement,
Consumer<REQ> awtOperation)
Executes an operation asynchronously on the AWT thread.
|
public static <RES> CompletionStage<RES> asyncAwtCallback(Supplier<RES> awtOperation)
RES - The type for the resulting objectawtOperation - The supplying operationCompletionStage for async computation monitoring.public static <RES,REQ> CompletionStage<RES> asyncAwtCallbackWithRequirement(Supplier<REQ> requirement, Function<REQ,RES> awtOperation)
asyncAwtCallback(Supplier) except that it performs a 2-steps operation. First calling the
requirement supplier and feeds the result into the awtOperation.RES - The result type for the whole computationREQ - The type returned by the first part of the computationrequirement - The first-step supplier computationawtOperation - The second-step computation which will be fed the result of the first stepCompletionStage for async computation monitoring.public static <REQ> CompletionStage<Void> asyncAwtRunnableWithRequirement(Supplier<REQ> requirement, Consumer<REQ> awtOperation)
REQ - The requirement's typerequirement - The operation's object which is operated onawtOperation - The operation to apply to the return result of the requirementCompletionStage for async computation monitoring.Copyright © 2018. All rights reserved.