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

net.lenni0451.commandlib.utils.interfaces.ThrowingSupplier Maven / Gradle / Ivy

The newest version!
package net.lenni0451.commandlib.utils.interfaces;

import java.util.function.Supplier;

/**
 * A functional interface equivalent to {@link Supplier} but with the ability to throw an exception.
 *
 * @param  The type of the value to supply
 */
@FunctionalInterface
public interface ThrowingSupplier {

    /**
     * Get the value.
     *
     * @return The value
     * @throws Throwable If an exception occurs
     */
    T get() throws Throwable;

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy