Skip to content

Instantly share code, notes, and snippets.

@nachivpn
Last active July 30, 2017 18:36
Show Gist options
  • Save nachivpn/24478cd8455031e9f70aaa536e0dc5ed to your computer and use it in GitHub Desktop.
Save nachivpn/24478cd8455031e9f70aaa536e0dc5ed to your computer and use it in GitHub Desktop.
getComponentPrice.java
//return the price of component in Either<Exception, Component> if price is available, else return exception
public Either<Exception,Double> getComponentPrice(Either<Exception, Component> response){
return response.bind(result -> findOriginalPrice(result.getId()));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment