Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add TriState toBoolean helper methods
While the TriState enum already has helper methods to quickly convert a boolean into a TriState (both nullable wrappers and their primitive counterparts), helper methods to convert a TriState back into a boolean representation are currently missing. This commit introduces two methods that do exactly that, one allowing a straight forward conversion to a Boolean as it can represent a TriState through its nullability as well as another method that discards the TriState#NOT_SET by accepting a supplier that will be used to map a not set tri-state.
- Loading branch information
Showing
2 changed files
with
93 additions
and
0 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