Skip to content

Instantly share code, notes, and snippets.

@Dalamar42
Created September 7, 2016 10:06
Show Gist options
  • Save Dalamar42/792b485d75403d8533c1032f9a0fe849 to your computer and use it in GitHub Desktop.
Save Dalamar42/792b485d75403d8533c1032f9a0fe849 to your computer and use it in GitHub Desktop.
String output = "value";
ListenableFuture<String> future = Futures.immediateFuture(output);
String transformedOutput = Promise.wrap(future)
.then(value -> value + "_a")
.then(value -> value + "_b")
.get();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment