News for hackers. Stuff that matters.
Re:Java Without If by village-idiot on Friday January 27, 2017 @09:43PM (#13504538)
Here's how this works. If a function would not return null originally, you continue to return the original type and use Optional::map.

If a function could return either T or null, return Optional<T>, and then use Optional::flatMap to join them together.

Pretty straightforward.

There are no comments on this comment yet.