public final class Optionals extends Object
Modifier and Type | Method and Description |
---|---|
static <T,E extends Exception> |
ifPresent(Optional<T> optional,
CheckedConsumer<? super T,E> consumer)
Like
Optional.ifPresent(java.util.function.Consumer) but allows checked exceptions to be thrown. |
public static <T,E extends Exception> void ifPresent(Optional<T> optional, CheckedConsumer<? super T,E> consumer) throws E extends Exception
Optional.ifPresent(java.util.function.Consumer)
but allows checked exceptions to be thrown.E extends Exception
Copyright © 2019 OpenDaylight. All rights reserved.