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

This commit is contained in:
2022-06-04 12:37:02 +08:00
parent eb1b6c804a
commit 9153ba2f2c
6 changed files with 6 additions and 6 deletions

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;
} }

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;
} }

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;
} }

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;
} }

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;
} }

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;
} }