Created
April 17, 2021 15:00
-
-
Save zivce/4864dd11dea394261874eff985eb7471 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
getValue(x).orElseGet(() -> getValue(y) | |
.orElseThrow(() -> new NotFoundException("value not present"))); | |
public Optional<Value> getValue(Source s) | |
{ | |
System.out.println("Source: " + s.getName()); | |
// returns value from s source | |
} | |
// when getValue(x) is present system will output | |
Source: x |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment