Skip to content

Instantly share code, notes, and snippets.

@joegaudet
Last active October 30, 2017 22:41
Show Gist options
  • Save joegaudet/94a49798a79d59f0298d06233605fd86 to your computer and use it in GitHub Desktop.
Save joegaudet/94a49798a79d59f0298d06233605fd86 to your computer and use it in GitHub Desktop.
Option<String> maybeString = someFunction();
String foo = maybeString.getOrElse("I'm some other string")
String foo2 = maybeString.getOrElse(() -> "I'm a string returned from a java lambda which has a -> instead of a =>.")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment