From b2187e8c2510d6e3e1a7d6ccb2b633082bd4e4db Mon Sep 17 00:00:00 2001 From: Agadar Date: Sun, 16 Aug 2020 22:09:33 +0200 Subject: [PATCH] Added CheckedSupplier. --- .../nationstates/function/CheckedSupplier.java | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 src/main/java/com/github/agadar/nationstates/function/CheckedSupplier.java diff --git a/src/main/java/com/github/agadar/nationstates/function/CheckedSupplier.java b/src/main/java/com/github/agadar/nationstates/function/CheckedSupplier.java new file mode 100644 index 0000000..d51a528 --- /dev/null +++ b/src/main/java/com/github/agadar/nationstates/function/CheckedSupplier.java @@ -0,0 +1,15 @@ +package com.github.agadar.nationstates.function; + +import java.util.function.Supplier; + +/** + * Supplier reference that can throw an Exception. See also {@link Supplier}. + * + * @author Agadar (https://github.com/Agadar/) + * + * @param the type of the result of the function + */ +@FunctionalInterface +public interface CheckedSupplier { + R get() throws Exception; +}