public final class Throwing extends Object
Modifier and Type | Class and Description |
---|---|
static interface |
Throwing.Runnable
Throwing runnable.
|
static interface |
Throwing.Supplier<R>
Run action.
|
Modifier and Type | Method and Description |
---|---|
static <T> T |
get(Throwing.Supplier<T> task)
Run action and returns a value.
|
static void |
run(Throwing.Runnable task)
Run action.
|
static <T extends Throwable> |
sneakyThrow(Throwable x)
Rethrow a checked exception.
|
public static void run(Throwing.Runnable task)
task
- Action.public static <T> T get(Throwing.Supplier<T> task)
T
- Action type.task
- Action.public static <T extends Throwable> RuntimeException sneakyThrow(Throwable x) throws T extends Throwable
T
- Exception wrapper.x
- Exception.T
- Exception.T extends Throwable
Copyright © 2021. All rights reserved.