Class UnorderedCollectionComparator

java.lang.Object
com.amazonaws.test.util.UnorderedCollectionComparator

public class UnorderedCollectionComparator extends Object
This class includes some utility methods for comparing two unordered collections.
  • Constructor Details

    • UnorderedCollectionComparator

      public UnorderedCollectionComparator()
  • Method Details

    • equalUnorderedCollections

      public static <T> boolean equalUnorderedCollections(Collection<T> colA, Collection<T> colB)
      Compares two unordered lists of the same type.
    • equalUnorderedCollections

      public static <A, B> boolean equalUnorderedCollections(Collection<A> colA, Collection<B> colB, UnorderedCollectionComparator.CrossTypeComparator<A,B> comparator)
      Compares two unordered lists of different types, using the specified cross-type comparator. Null collections are treated as empty ones. Naively implemented using N(n^2) algorithm.