public CallbackWrapper
An interface which is implemented by objects that wrap callbacks.
For instance, this interface can be used to run callbacks on the main thread, which depends on the platform OCast is running on.
Modifier and Type | Method and Description |
---|---|
<T> Consumer<T> |
wrap(Consumer<T> consumer)
Wraps a
interface Consumer into a new one. |
java.lang.Runnable |
wrap(java.lang.Runnable runnable)
Wraps a Runnable into a new one.
|
@NotNull <T> Consumer<T> wrap(@NotNull Consumer<T> consumer)
Wraps a interface Consumer
into a new one.
T
- The type of the interface Consumer
parameter.
consumer
- The consumer to wrap.interface Consumer