Skip to content
New issue

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

Make Lazy.orElseGet(Supplier) public #2929

Closed
gregturn opened this issue Sep 13, 2023 · 0 comments
Closed

Make Lazy.orElseGet(Supplier) public #2929

gregturn opened this issue Sep 13, 2023 · 0 comments
Assignees
Labels
for: team-attention An issue we need to discuss as a team to make progress in: core Issues in core support status: waiting-for-triage An issue we've not yet triaged type: enhancement A general enhancement

Comments

@gregturn
Copy link
Contributor

A very useful method would be the orElseGet() method, giving you the ability to provide alternative behavior for a given Lazy but without having to commit to the final object UNLESS invoked.

Optional.orElseGet(Supplier<? extends T> supplier) is quite handy in this respect. Parity in our Lazy type would be quite useful.

@gregturn gregturn added in: core Issues in core support for: team-attention An issue we need to discuss as a team to make progress type: enhancement A general enhancement labels Sep 13, 2023
gregturn added a commit that referenced this issue Sep 13, 2023
gregturn added a commit that referenced this issue Sep 13, 2023
@gregturn gregturn linked a pull request Sep 13, 2023 that will close this issue
@gregturn gregturn added the status: waiting-for-triage An issue we've not yet triaged label Sep 13, 2023
@mp911de mp911de self-assigned this Sep 14, 2023
mp911de added a commit that referenced this issue Sep 14, 2023
Refine Javadoc. Add unit tests.

See #2929
Original pull request: #2930
@mp911de mp911de added this to the 3.2 M3 (2023.1.0) milestone Sep 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
for: team-attention An issue we need to discuss as a team to make progress in: core Issues in core support status: waiting-for-triage An issue we've not yet triaged type: enhancement A general enhancement
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants