
com.machinezoo.noexception.throwing.ThrowingIntSupplier 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 IntSupplier} that allows throwing checked exceptions.
* {@code ThrowingIntSupplier} is usually implemented by a lambda
* and passed to {@link CheckedExceptionHandler#fromIntSupplier(ThrowingIntSupplier)}.
* See noexception tutorial.
*
* @see CheckedExceptionHandler#fromIntSupplier(ThrowingIntSupplier)
* @see IntSupplier
*/
@FunctionalInterface public interface ThrowingIntSupplier {
/**
* Variation of {@link IntSupplier#getAsInt()} that allows throwing checked exceptions.
*
* @return see {@link IntSupplier#getAsInt()}
* @throws Exception
* if unable to complete
* @see CheckedExceptionHandler#fromIntSupplier(ThrowingIntSupplier)
* @see IntSupplier#getAsInt()
*/
int getAsInt() throws Exception;
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy