Created
March 14, 2020 03:53
-
-
Save ashkrit/530a3c8c18ebad50d16edb1d8e937eeb 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
| //Use IfPresent & other cool things | |
| phone | |
| .filter(number -> hasOptIn(number)) | |
| .ifPresent(number -> System.out.println("Calling Phone " + number)); | |
| .filter(m -> hasOptIn(m)) | |
| .ifPresent(m -> System.out.println("Sending Email " + m)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment