Skip to content

Instantly share code, notes, and snippets.

@wataru218
Created May 22, 2020 00:50
Show Gist options
  • Save wataru218/31acb42d7a3cefa20171b4778b80a599 to your computer and use it in GitHub Desktop.
Save wataru218/31acb42d7a3cefa20171b4778b80a599 to your computer and use it in GitHub Desktop.
public class ObjectUtils {
public static boolean equalsAny(Object obj, Object... others) {
if (others != null) {
for (Object other : others) {
if (Objects.equals(obj, other)) {
return true;
}
}
}
return false;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment