Java, Eclipse Collections, Open Source, Software Development, Programming.
.collect(Collectors.partitioningBy(each -> each % 2 == 0)); List<Integer> evens = map.get(true); List<Integer> odds = map.get(false); List<Integer> ummm = map.get(null); List<Integer> ohno = map.get(new Object()); Assertions.assertEquals(List.of(2, 4, 6, 8, 10), evens);