-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Backport to branch(3) : Add ThrowableConsumer (#1382)
Co-authored-by: Toshihiro Suzuki <[email protected]>
- Loading branch information
1 parent
0d8830f
commit 9194e7a
Showing
4 changed files
with
9 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
package com.scalar.db.util; | ||
|
||
@FunctionalInterface | ||
public interface ThrowableConsumer<A, T extends Throwable> { | ||
void accept(A arg) throws T; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
package com.scalar.db.util; | ||
|
||
@FunctionalInterface | ||
public interface ThrowableFunction<R, A, T extends Throwable> { | ||
public interface ThrowableFunction<A, R, T extends Throwable> { | ||
R apply(A arg) throws T; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters