Class Optionals
- java.lang.Object
-
- org.opendaylight.infrautils.utils.Optionals
-
public final class Optionals extends Object
Utilities for Optionals.- Author:
- Michael Vorburger.ch
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <T,E extends Exception>
voidifPresent(Optional<T> optional, CheckedConsumer<? super T,E> consumer)
LikeOptional.ifPresent(java.util.function.Consumer)
but allows checked exceptions to be thrown.
-
-
-
Method Detail
-
ifPresent
public static <T,E extends Exception> void ifPresent(Optional<T> optional, CheckedConsumer<? super T,E> consumer) throws E extends Exception
LikeOptional.ifPresent(java.util.function.Consumer)
but allows checked exceptions to be thrown.- Throws:
E extends Exception
-
-