T
- type of the result propagated to the consumer via #Consumer.accept() callpublic interface ResultConsumer<T> extends Consumer<T>
Modifier and Type | Method and Description |
---|---|
static <V> ResultConsumer<V> |
createResultConsumer(Consumer<V> consumer,
Consumer<Throwable> onErrorCallback)
Convenience Method that generates a
ResultConsumer . |
void |
onError(Throwable throwable)
Method Indicates An Erroneous State
|
void onError(Throwable throwable)
throwable
- The Object describing the errorstatic <V> ResultConsumer<V> createResultConsumer(Consumer<V> consumer, Consumer<Throwable> onErrorCallback)
ResultConsumer
.
Intended Usage: ResultConsumer.createResultConsumer((val) -< {handling code here}, (error) -< {handling code here})V
- Type Of The Value Passed To The Consumerconsumer
- CallBackonErrorCallback
- Method to be called when an error occurs.Copyright © 2021. All rights reserved.