Skip to content

Add contains any of #73

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

Merged
merged 1 commit into from
Jun 18, 2025
Merged

Add contains any of #73

merged 1 commit into from
Jun 18, 2025

Conversation

kmclarnon
Copy link
Member

@kmclarnon kmclarnon commented Jun 13, 2025

A minor optimization / QoL feature to replace code like this

boolean isThing = wse.contains(MyEnum.ONE) || wse.contains(MyEnum.TWO);
if (isThing) {
 // do stuff
}

Seems worth it to me to add, but happy to get other opinions

@Xcelled @mjball @suruuK @jaredstehler

Copy link
Contributor

@jaredstehler jaredstehler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@mjball
Copy link

mjball commented Jun 17, 2025

I would like to use this yesterday!

@jaredstehler jaredstehler merged commit 63cc98e into master Jun 18, 2025
1 check failed
@jaredstehler jaredstehler deleted the km/add-contains-multi branch June 18, 2025 16:54
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.

3 participants