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 booleanDeprecated.static booleanstatic booleaneqListSorted(List<?> as, List<?> bs) Deprecated.static booleaneqListUnsorted(List<?> as, List<?> bs) Compare the (distinct) elements of two lists for equality treating the lists as sets.static booleanDeprecated.static booleanDeprecated.static intDeprecated.static booleanCheck ifaandbare not equal.
-
Method Details
-
eqObj
Deprecated.Check ifaandbare equal. Each of them may be null. -
eq
Deprecated.Check ifaandbare equal. Each of them may be null. -
ne
Check ifaandbare not equal. Each of them may be null. -
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 != {}
-
eqListSorted
Deprecated.Compare the elements of two lists one by one. -
eqMap
Deprecated.Compare two maps. -
bothNotNull
-
hash
Deprecated.Create a hash code for a list of objects. Each of them may be null. Algorithm adapted from "Programming in Scala, Second Edition", p670.
-
eqObj(Object, Object)orList.equals(Object)