Last active
December 18, 2018 07:14
-
-
Save KevinTyrrell/eb7cd6c35b31b64f08852b4781003cb6 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
public class B | |
{ | |
public static List<B> transform(List<A> as) | |
{ | |
try | |
{ | |
return as.stream() | |
.map(a -> | |
{ | |
if (a.nope()) throw new Exception(); | |
return new B(a.getName()); | |
} | |
.collect(Collections.toList()); | |
} | |
catch (Exception e) { return null; } | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment