Skip to content

Instantly share code, notes, and snippets.

@zivce
Created April 17, 2021 15:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zivce/5709ffa70f47f0942115f2444cff9204 to your computer and use it in GitHub Desktop.
Save zivce/5709ffa70f47f0942115f2444cff9204 to your computer and use it in GitHub Desktop.
1 public Optional<String> fetchStoreStatus(int storeId) {
2 Optional<String> foundStore = ... ; // fetch declared store status by id
3 return foundStore.or(() -> Optional.of("store uid not found"));
4 }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment