Last active
May 30, 2019 22:13
-
-
Save adamv/ef441839cfa94373d1875a4babce9cc1 to your computer and use it in GitHub Desktop.
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
When did this: | |
Optional.ofNullable(value) | |
.map(MyType::getProp) | |
.map(x -> x.equals(MyEnum.VALUE)) | |
.orElse(Boolean.FALSE) | |
get sexier than this: | |
value != null && MyEnum.VALUE.equals(value.getProp()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment