Last active
July 30, 2017 18:36
-
-
Save nachivpn/24478cd8455031e9f70aaa536e0dc5ed to your computer and use it in GitHub Desktop.
getComponentPrice.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//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