Package com.regnosys.rosetta.common.util
Class CollectionUtils
java.lang.Object
com.regnosys.rosetta.common.util.CollectionUtils
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <A> booleancollectionContains(Collection<A> col1, Collection<A> col2, BiPredicate<A, A> comparer) Tests if two collections contain matching elements (ignoring ordering)static <A> booleanlistMatch(List<A> list1, List<A> list2, BiPredicate<A, A> comparer) Tests if two lists contain matching elements in the same order
-
Constructor Details
-
CollectionUtils
public CollectionUtils()
-
-
Method Details
-
listMatch
Tests if two lists contain matching elements in the same order- Parameters:
list1- A listlist2- A listcomparer- A BiPredicate that compares two objects and returns true if they "match"- Returns:
-
collectionContains
public static <A> boolean collectionContains(Collection<A> col1, Collection<A> col2, BiPredicate<A, A> comparer) Tests if two collections contain matching elements (ignoring ordering)- Parameters:
col1- A collectioncol2- A collectioncomparer- A BiPredicate that compares two objects and returns true if they "match"- Returns:
-