Skip to content

Support getting a value or invoking a supplier if the value is not set#24

Open
hduelme wants to merge 2 commits intomapstruct:mainfrom
hduelme:Support-getting-a-value-or-invoking-a-supplier-if-the-value-is-not-set
Open

Support getting a value or invoking a supplier if the value is not set#24
hduelme wants to merge 2 commits intomapstruct:mainfrom
hduelme:Support-getting-a-value-or-invoking-a-supplier-if-the-value-is-not-set

Conversation

@hduelme
Copy link
Contributor

@hduelme hduelme commented Mar 16, 2026

I implemented #8, inspired by Optinal.orElseGet from the Java standard library.

@filiphr
Copy link
Member

filiphr commented Mar 16, 2026

Thanks @hduelme. Can we maybe add a test case for this?

@hduelme
Copy link
Contributor Author

hduelme commented Mar 16, 2026

@filiphr I added tests for the public API. For now this covers create and createArray. I intentionally avoided parameterizing the tests or extracting assertion helpers, since that would make the tests less readable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants