-
Notifications
You must be signed in to change notification settings - Fork 171
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
api: add helper methods for Suppliers (#1086)
Adds methods to the Timer interface to make it easier to work with the Supplier types in the JDK. There is already a method that works with Callable, but since that throws Exception it can be cumbersome to use in code. Methods have also been added for the suppliers with primitive types to avoid boxing. Overload resolution can be messy with lambdas. To avoid those issues record methods have been added with a different name for each interface. The existing record methods for Callable and Runnable have been deprecated in favor of the more specifically named method. Fixes #566.
- Loading branch information
1 parent
74f30dd
commit 4a6e64d
Showing
14 changed files
with
374 additions
and
200 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
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
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
Oops, something went wrong.