Skip to content

Commit 6407868

Browse files
committed
feat: add throwable package
1 parent 42e1fc9 commit 6407868

File tree

6 files changed

+45
-0
lines changed

6 files changed

+45
-0
lines changed
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
package com.github.lokic.javaplus.func.throwable;
2+
3+
@FunctionalInterface
4+
public interface ThrowConsumer1<T> {
5+
6+
void throwableAccept(T t) throws Throwable;
7+
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
package com.github.lokic.javaplus.func.throwable;
2+
3+
4+
@FunctionalInterface
5+
public interface ThrowFunction1<T, R> {
6+
7+
R throwableApply(T t) throws Throwable;
8+
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
package com.github.lokic.javaplus.func.throwable;
2+
3+
4+
@FunctionalInterface
5+
public interface ThrowFunction2<T1, T2, R> {
6+
7+
R throwableApply(T1 t1, T2 t2) throws Throwable;
8+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
package com.github.lokic.javaplus.func.throwable;
2+
3+
@FunctionalInterface
4+
public interface ThrowFunction3<T1, T2, T3, R> {
5+
6+
R throwableApply(T1 t1, T2 t2, T3 t3) throws Throwable;
7+
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
package com.github.lokic.javaplus.func.throwable;
2+
3+
4+
@FunctionalInterface
5+
public interface ThrowRunnable {
6+
7+
void throwableRun() throws Throwable;
8+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
package com.github.lokic.javaplus.func.throwable;
2+
3+
@FunctionalInterface
4+
public interface ThrowSupplier<T> {
5+
6+
T throwableGet() throws Throwable;
7+
}

0 commit comments

Comments
 (0)