![JAR search and dependency download from the Maven repository](/logo.png)
com.machinezoo.noexception.throwing.ThrowingLongSupplier Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of noexception Show documentation
Show all versions of noexception Show documentation
Makes exception handling concise and beautiful, yet architecturally clean and flexible.
// 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 LongSupplier} that allows throwing checked exceptions.
* {@code ThrowingLongSupplier} is usually implemented by a lambda
* and passed to {@link CheckedExceptionHandler#fromLongSupplier(ThrowingLongSupplier)}.
* See noexception tutorial.
*
* @see CheckedExceptionHandler#fromLongSupplier(ThrowingLongSupplier)
* @see LongSupplier
*/
@FunctionalInterface public interface ThrowingLongSupplier {
/**
* Variation of {@link LongSupplier#getAsLong()} that allows throwing checked exceptions.
*
* @return see {@link LongSupplier#getAsLong()}
* @throws Exception
* if unable to complete
* @see CheckedExceptionHandler#fromLongSupplier(ThrowingLongSupplier)
* @see LongSupplier#getAsLong()
*/
long getAsLong() throws Exception;
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy