Skip to content

Instantly share code, notes, and snippets.

@harukizaemon
Created October 1, 2014 06:07
Show Gist options
  • Save harukizaemon/d2e74236842e33cfd288 to your computer and use it in GitHub Desktop.
Save harukizaemon/d2e74236842e33cfd288 to your computer and use it in GitHub Desktop.
public static boolean isPresent(final Optional<?> ... optionals) {
for (final Optional<?> optional : optionals) {
if (!optional.isPresent()) {
return false;
}
}
return optionals.length > 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment