Java Collection Equal equalsUnordered(Collection collection1, Collection collection2)

Here you can find the source of equalsUnordered(Collection collection1, Collection collection2)

Description

equals Unordered

License

Open Source License

Declaration

public static boolean equalsUnordered(Collection<?> collection1, Collection<?> collection2) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import java.util.Collection;

public class Main {
    public static boolean equalsUnordered(Collection<?> collection1, Collection<?> collection2) {
        return collection1 == collection2
                || (collection1.size() == collection2.size() && collection1.containsAll(collection2));
    }/* w  w w  . j a va2 s  . co  m*/
}

Related

  1. equalsCollectionsAnyOrder(Collection i1, Collection i2)
  2. equalsNull(Collection collection)
  3. equalsOne(final T o1, final Collection others)
  4. equalsSet(Collection c1, Collection c2)
  5. equalsSet(Collection c1, Collection c2)
  6. equalsUnordered(Collection collection1, Collection collection2)
  7. equalsUnorderedCollections(Collection a, Collection b)
  8. equalTestData(Collection receivedDataSet)
  9. getContainedEquals(Collection a, T b)