Package org.forgerock.openig.util
Class PromiseUtil
- java.lang.Object
 - 
- org.forgerock.openig.util.PromiseUtil
 
 
- 
public final class PromiseUtil extends Object
Utility class for promises management. 
- 
- 
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <T> ResultHandler<T>consumeIfPresent(Consumer<T> consumer)Execute the consumer if result is not null. 
 - 
 
- 
- 
Method Detail
- 
consumeIfPresent
public static <T> ResultHandler<T> consumeIfPresent(Consumer<T> consumer)
Execute the consumer if result is not null.- Type Parameters:
 T- The object type to handle- Parameters:
 consumer- a consumer for the expected result.- Returns:
 - a 
ResultHandlerthat consumes the promised result. 
 
 - 
 
 -