Here you can find the source of isListContainsDuplicateElement(List oneList)
public static Boolean isListContainsDuplicateElement(List oneList)
//package com.java2s; //License from project: Open Source License import java.util.*; public class Main { public static Boolean isListContainsDuplicateElement(List oneList) { Boolean containsDuplicateElement = false; for (Integer i = 0; i < oneList.size() - 1; i++) { for (Integer j = i + 1; j < oneList.size(); j++) { if (oneList.get(i).equals(oneList.get(j))) { return true; }//w w w . j a v a 2 s. c o m } } return containsDuplicateElement; } }