All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.machinezoo.noexception.throwing.ThrowingLongConsumer Maven / Gradle / Ivy

There is a newer version: 1.9.1
Show newest version
// Part of NoException: https://noexception.machinezoo.com
// Generated code. Edit generate.py instead.
package com.machinezoo.noexception.throwing;

import java.util.function.*;
import com.machinezoo.noexception.*;

/**
 * Variation of {@link LongConsumer} that allows throwing checked exceptions.
 * {@code ThrowingLongConsumer} is usually implemented by a lambda
 * and passed to {@link CheckedExceptionHandler#fromLongConsumer(ThrowingLongConsumer)}.
 * See noexception tutorial.
 * 
 * @see CheckedExceptionHandler#fromLongConsumer(ThrowingLongConsumer)
 * @see LongConsumer
 */
@FunctionalInterface public interface ThrowingLongConsumer {
	/**
	 * Variation of {@link LongConsumer#accept(long)} that allows throwing checked exceptions.
	 * 
	 * @param value
	 *            see {@link LongConsumer#accept(long)}
	 * @throws Exception
	 *             if unable to complete
	 * @see CheckedExceptionHandler#fromLongConsumer(ThrowingLongConsumer)
	 * @see LongConsumer#accept(long)
	 */
	void accept(long value) throws Exception;
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy