Skip to content

Conversation

@MirkoBonadei
Copy link

To cleanup code in a project I am working on, I have implemented the oneOf function with its own tests into the UtilityTest file, and I have decided to push it back to your project.

The purpose is to return the first argument which is not null, and it is able to receive not only standard values but callable and Exceptions too.

So, it the first argument which is not null is an exception it will throw it, if it is a callable it will execute it returning the result if it is not null.

Cheers

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.

1 participant