Skip to content

Instantly share code, notes, and snippets.

@motlin
Last active May 15, 2018 21:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save motlin/a0fcb2ba58101b11c0ce6791cbd7e32e to your computer and use it in GitHub Desktop.
Save motlin/a0fcb2ba58101b11c0ce6791cbd7e32e to your computer and use it in GitHub Desktop.
MutableList<Person> people = ...;
MutableList<Person> res1 = people.distinct();
MutableList<Person> res2 = people.distinct(HashingStrategies.fromFunction(Person::getSystemId));
MutableList<Person> res3 = people.distinctBy(Person::getSystemId);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment