Created
November 5, 2018 19:07
-
-
Save gnmmarechal/8b6a2f6ba8468b155db4b12909294638 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
import java.util.List; | |
import java.util.function.Predicate; | |
import java.util.stream.Collectors; | |
public class ListsProcess { | |
public static <T> List<T> filter(List<T> list, Predicate<? super T> filter) | |
{ | |
return list.stream().filter(filter).collect(Collectors.toList()); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment