public final class ComposeRunnableUtil extends Object
Modifier and Type | Method and Description |
---|---|
static <T extends AutoCloseable> |
composedClose(T... closeables)
Given a number of streams, closes the streams in sequence, even if one or
several throws an Exception.
|
static void |
composedRunnable(Collection<Runnable> runnables)
Given a number of Runnables, runs the run() method in sequence, even if
one or several throws an Exception.
|
@SafeVarargs public static <T extends AutoCloseable> void composedClose(T... closeables)
T
- Stream typecloseables
- to closeSpeedmentException
- if at least one of the close() operations
throws an exceptionpublic static void composedRunnable(Collection<Runnable> runnables)
runnables
- to closeSpeedmentException
- if at least one of the run() operations throws
an exceptionCopyright © 2019 Speedment, Inc.. All rights reserved.