Last active
May 19, 2019 12:47
-
-
Save DeppWang/98fa0bdcbae0a51ca490b75813fe1057 to your computer and use it in GitHub Desktop.
去除List中重复元素
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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