Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int threshold = 10;
- List<Foo> lowerFooList = fooList.stream().filter(foo->foo.getField() <= threshold).collect(Collectors.toList());
- List<Foo> higherFooList = fooList.stream().filter(foo->foo.getField() > threshold).collect(Collectors.toList());
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement