@SafeVarargs // Creating a Stream of an array is safe.
    @SuppressWarnings({"unchecked", "varargs"})
    public static <T extends AutoCloseable> void composedClose(T... closeables) {
        requireNonNullElements(closeables);
        Exception exception = null;

        for (final T closable : closeables) {
            try {
                closable.close();
            } catch (Exception e) {
                if (exception == null) {
                    exception = e;
                } else {
                    try {
                        exception.addSuppressed(e);
                    } catch (Exception ignored) {
                        // No op
                    }
                }
            }
        }

        if (exception != null) {
            throw new SpeedmentException(exception);
        }
    }
Given a number of streams, closes the streams in sequence, even if one or
several throws an Exception. If several throw exceptions, the exceptions
will be added to the first exception.

@param <T> Stream type
@param closeables to close
@throws SpeedmentException if at least one of the close() operations
throws an exception
runtime-parent/runtime-core/src/main/java/com/speedment/runtime/core/stream/ComposeRunnableUtil.java