Skip to content

Instantly share code, notes, and snippets.

@gaboratorium
Created January 24, 2018 12:12
Show Gist options
  • Save gaboratorium/9f123856b595284d1f976d7046a69763 to your computer and use it in GitHub Desktop.
Save gaboratorium/9f123856b595284d1f976d7046a69763 to your computer and use it in GitHub Desktop.
Duplicate removal #java #stream
myCollection
.collect(Collectors.toMap(MyClass::getProperty, b -> b, (duplicate1, duplicate2) -> duplicate1))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment