I am trying to make a List of all of the books in one Collection that are not present in another. My problem is that I need to compare based on book ID
List
Collection
List books1 = ...; List books2 = ...; Set ids = books2.stream() .map(Book::getId) .collect(Collectors.toSet()); List parentBooks = books1.stream() .filter(book -> !ids.contains(book.getId())) .collect(Collectors.toList());