In Java 8 how can I filter a collection using the Stream API by checking the distinctness of a property of each object?
Stream
For example I have a list of
Set set = new HashSet<>(); list .stream() .filter(it -> set.add(it.getYourProperty())) .forEach(it -> ...);