Java List Contain isListContainsDuplicateElement(List oneList)

Here you can find the source of isListContainsDuplicateElement(List oneList)

Description

is List Contains Duplicate Element

License

Open Source License

Declaration

public static Boolean isListContainsDuplicateElement(List oneList) 

Method Source Code

//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;
    }
}

Related

  1. isContainedInAll(String keyToSearch, List> list)
  2. isContains(final Object value, final Object... list)
  3. isContains(List roles, String role, String module)
  4. isEitherContains(List one, List two)
  5. isListContainAll(List list, T... checkItems)
  6. pathContains(List path, String source, String label, String target)
  7. replaceWithList(List containingList, String key, List list)
  8. strContainsbyList(String str, List filterList)
  9. stringContains(String line, List list)