Skip to content

Instantly share code, notes, and snippets.

@DeppWang
Last active May 19, 2019 12:47
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 DeppWang/98fa0bdcbae0a51ca490b75813fe1057 to your computer and use it in GitHub Desktop.
Save DeppWang/98fa0bdcbae0a51ca490b75813fe1057 to your computer and use it in GitHub Desktop.
去除List中重复元素
List<String> configurations = getCandidateConfigurations(annotationMetadata,attributes);
configurations = removeDuplicates(configurations);
protected final <T> List<T> removeDuplicates(List<T> list) {
return new ArrayList<>(new LinkedHashSet<>(list));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment