flink-instrumentation/workspace/flink-1.4.1-instrumented/flink-1.4.1/flink-core/src/main/java/org/apache/flink/util/LambdaUtil.java
/**
	 * This method supplies all elements from the input to the consumer. Exceptions that happen on elements are
	 * suppressed until all elements are processed. If exceptions happened for one or more of the inputs, they are
	 * reported in a combining suppressed exception.
	 *
	 * @param inputs iterator for all inputs to the throwingConsumer.
	 * @param throwingConsumer this consumer will be called for all elements delivered by the input iterator.
	 * @param <T> the type of input.
	 * @throws Exception collected exceptions that happened during the invocation of the consumer on the input elements.
	 */
This method supplies all elements from the input to the consumer. Exceptions that happen on elements are
suppressed until all elements are processed. If exceptions happened for one or more of the inputs, they are
reported in a combining suppressed exception.

@param inputs iterator for all inputs to the throwingConsumer.
@param throwingConsumer this consumer will be called for all elements delivered by the input iterator.
@param  the type of input.
@throws Exception collected exceptions that happened during the invocation of the consumer on the input elements.
This method supplies all elements from the input to the consumer . Exceptions that happen on elements are suppressed until all elements are processed . If exceptions happened for one or more of the inputs they are reported in a combining suppressed exception . @param inputs iterator for all inputs to the throwingConsumer . @param throwingConsumer this consumer will be called for all elements delivered by the input iterator . @param the type of input . @throws Exception collected exceptions that happened during the invocation of the consumer on the input elements .
public static <T> void applyToAllWhileSuppressingExceptions(
		Iterable<T> inputs,
		ThrowingConsumer<T> throwingConsumer) throws Exception {
		if (inputs != null && throwingConsumer != null) {
			Exception exception = null;
			for (T input : inputs) {
				if (input != null) {
					try {
						throwingConsumer.accept(input);
					} catch (Exception ex) {
						exception = ExceptionUtils.firstOrSuppressed(ex, exception);
					}
				}
			}
			if (exception != null) {
				throw exception;
			}
		}
	}
public static < T > void applyToAllWhileSuppressingExceptions ( Iterable < T > inputs , ThrowingConsumer < T > throwingConsumer ) throws Exception { if ( inputs != null && throwingConsumer != null ) { Exception exception = null ; for ( T input : inputs ) { if ( input != null ) { try { throwingConsumer . accept ( input ) ; } catch ( Exception ex ) { exception = ExceptionUtils . firstOrSuppressed ( ex , exception ) ; } } } if ( exception != null ) { throw exception ; } } }
This method supplies all elements from the input to the consumer.
This method supplies all elements from the input to the consumer .