Package org.opencastproject.util
Class EqualsUtil
java.lang.Object
org.opencastproject.util.EqualsUtil
Utility function helping to implement equality.
-
Method Summary
Modifier and TypeMethodDescriptionstatic booleanbothNotNull(Object a, Object b) static booleanstatic booleaneqListUnsorted(List<?> as, List<?> bs) Compare the (distinct) elements of two lists for equality treating the lists as sets.
-
Method Details
-
eqClasses
-
eqListUnsorted
Compare the (distinct) elements of two lists for equality treating the lists as sets.Sets by definition do not allow multiplicity of elements; a set is a (possibly empty) collection of distinct elements. As Lists may contain non-unique entries, this method removes duplicates before continuing with the comparison check. Examples of 1. equality: {1, 2} = {2, 1} = {1, 1, 2} = {1, 2, 2, 1, 2}, null = null 2. unequal: {1, 2, 2} != {1, 2, 3}, null != {}
-
bothNotNull
-