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

com.machinezoo.noexception.throwing.ThrowingToDoubleFunction 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 ToDoubleFunction} that allows throwing checked exceptions.
 * {@code ThrowingToDoubleFunction} is usually implemented by a lambda
 * and passed to {@link CheckedExceptionHandler#fromToDoubleFunction(ThrowingToDoubleFunction)}.
 * See noexception tutorial.
 * 
 * @param 
 *            see {@link ToDoubleFunction}
 * @see CheckedExceptionHandler#fromToDoubleFunction(ThrowingToDoubleFunction)
 * @see ToDoubleFunction
 */
@FunctionalInterface public interface ThrowingToDoubleFunction {
	/**
	 * Variation of {@link ToDoubleFunction#applyAsDouble(Object)} that allows throwing checked exceptions.
	 * 
	 * @param value
	 *            see {@link ToDoubleFunction#applyAsDouble(Object)}
	 * @return see {@link ToDoubleFunction#applyAsDouble(Object)}
	 * @throws Exception
	 *             if unable to complete
	 * @see CheckedExceptionHandler#fromToDoubleFunction(ThrowingToDoubleFunction)
	 * @see ToDoubleFunction#applyAsDouble(Object)
	 */
	double applyAsDouble(T value) throws Exception;
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy