We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
something like:
return Optional.empty() \ .or(Optional.empty()) \ .or(Optional.of(3)) \ .or(Optional.of(4))
would return Optional.of(3) where as:
return Optional.empty() \ .or(Optional.empty()) \ .or(Optional.empty())
would return Optional.empty()
It would also be nice if we could pass suppliers, such that we only execute a supplier if the result of the previous suppliers was empty.
The text was updated successfully, but these errors were encountered:
For documentation's sake, the solution here is Python's built-in or.
or
The first example can be done as follows:
return Optional.empty() or \ Optional.empty() or \ Optional.of(3) or \ Optional.of(4)
and the second:
return Optional.empty() or \ Optional.empty() or \ Optional.empty()
Sorry, something went wrong.
cbefus
No branches or pull requests
something like:
would return Optional.of(3) where as:
would return Optional.empty()
It would also be nice if we could pass suppliers, such that we only execute a supplier if the result of the previous suppliers was empty.
The text was updated successfully, but these errors were encountered: