Advertisement
Guest User

Untitled

a guest
Nov 10th, 2019
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.24 KB | None | 0 0
  1. int threshold = 10;
  2.  
  3. List<Foo> lowerFooList = fooList.stream().filter(foo->foo.getField() <= threshold).collect(Collectors.toList());
  4. List<Foo> higherFooList = fooList.stream().filter(foo->foo.getField() > threshold).collect(Collectors.toList());
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement