public static < T > boolean listContainsDuplicates ( List < T > list ) { return list . size ( ) != new HashSet <> ( list ) . size ( ) ; }
Determines whether a list contains the same example more than once .