(Predicate<Integer> pred)
| 7 | public class FIStatic { |
| 8 | |
| 9 | public static List<Object> numbers(Predicate<Integer> pred) { |
| 10 | List<Integer> numbers = Arrays.asList(-2, -1, 0, 1, 2); |
| 11 | Object[] filteredNumbers = numbers.stream().filter(pred).toArray(); |
| 12 | return Arrays.asList(filteredNumbers); |
| 13 | } |
| 14 | |
| 15 | public static String allowsNullFI(Predicate<String> pred) { |
| 16 | if(pred == null) { |