improved functional interfaces to work with lambda throwing java.lang.Throwable instances

This commit is contained in:
woggioni committed 2022-06-04 12:38:47 +08:00
1 parent eb1b6c804a
commit 9153ba2f2c
6 files changed
+6 -6

No files matched your search

+1 -1
View File
@@ -12,5 +12,5 @@ public interface BiCon<T, U> extends BiConsumer<T, U> {
exec(t, u); exec(t, u);
} }
void exec(T t, U u) throws Exception; void exec(T t, U u) throws Throwable;
} }
+1 -1
View File
@@ -12,5 +12,5 @@ public interface BiFun<T, U, V> extends BiFunction<T, U, V> {
return exec(t, u); return exec(t, u);
} }
V exec(T t, U u) throws Exception; V exec(T t, U u) throws Throwable;
} }
+1 -1
View File
@@ -12,5 +12,5 @@ public interface Con<T> extends Consumer<T> {
exec(t); exec(t);
} }
void exec(T t) throws Exception; void exec(T t) throws Throwable;
} }
+1 -1
View File
@@ -12,5 +12,5 @@ public interface Fun<T, U> extends Function<T, U> {
return exec(t); return exec(t);
} }
U exec(T t) throws Exception; U exec(T t) throws Throwable;
} }
+1 -1
View File
@@ -12,5 +12,5 @@ public interface Pre<T> extends Predicate<T> {
return exec(t); return exec(t);
} }
boolean exec(T t) throws Exception; boolean exec(T t) throws Throwable;
} }
+1 -1
View File
@@ -12,5 +12,5 @@ public interface Sup<T> extends Supplier<T> {
return exec(); return exec();
} }
T exec() throws Exception; T exec() throws Throwable;
} }