Package software.amazon.awssdk.testutils
Class UnorderedCollectionComparator
java.lang.Object
software.amazon.awssdk.testutils.UnorderedCollectionComparator
This class includes some utility methods for comparing two unordered
collections.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceA simple interface that attempts to compare objects of two different types -
Method Summary
Modifier and TypeMethodDescriptionstatic <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.static <T> booleanequalUnorderedCollections(Collection<T> colA, Collection<T> colB) Compares two unordered lists of the same type.
-
Method Details
-
equalUnorderedCollections
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.
-