-
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
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 dbbc885
Showing
12 changed files
with
201 additions
and
191 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.