SyntaxFix
Write A Post
Hire A Developer
Questions
I recommend using Vavr, if you can. With this library you can do the following:
io.vavr.collection.List.ofAll(persons) .distinctBy(Person::getName) .toJavaSet() // or any another Java 8 Collection