Package com.landawn.abacus.util
Class If.OrElse
java.lang.Object
com.landawn.abacus.util.If.OrElse
- Enclosing class:
If
The Class OrElse.
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescription<E extends Throwable>
voidorElse
(Throwables.Runnable<E> cmd) <U,
E extends Throwable>
voidorElse
(U init, Throwables.Consumer<? super U, E> action) <E extends Throwable>
voidorElseThrow
(Supplier<? extends E> exceptionSupplier) Or else throw.
-
Field Details
-
TRUE
For internal only -
FALSE
For internal only
-
-
Method Details
-
orElse
- Type Parameters:
E
-- Parameters:
cmd
-- Throws:
E
- the e
-
orElse
public <U,E extends Throwable> void orElse(U init, Throwables.Consumer<? super U, E> action) throws E- Type Parameters:
U
-E
-- Parameters:
init
-action
-- Throws:
E
- the e
-
orElseThrow
Or else throw.- Type Parameters:
E
-- Parameters:
exceptionSupplier
-- Throws:
E
- the e
-