public final class EqualityUtils
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static boolean |
isDifferent(java.lang.Object o1,
java.lang.Object o2)
Checks if two objects are different, ie
!isEqual(o1, o2) . |
static <T> boolean |
isDifferent(T[] array1,
T[] array2)
Checks if two object arrays are different, ie
!isEqual(array1, array2) . |
static boolean |
isEqual(java.lang.Object o1,
java.lang.Object o2)
Checks if two objects are equal.
|
static <T> boolean |
isEqual(T[] array1,
T[] array2)
Checks if two object arrays are logically equal.
|
public static boolean isDifferent(java.lang.Object o1, java.lang.Object o2)
!isEqual(o1, o2)
.o1
- the first object to compareo2
- the second object to comparepublic static <T> boolean isDifferent(T[] array1, T[] array2)
!isEqual(array1, array2)
.T
- the component type of the arrays.array1
- the first array to comparearray2
- the second array to comparepublic static boolean isEqual(java.lang.Object o1, java.lang.Object o2)
Objects.equals
,
this works for arrays as well. This only needs to exist because the array equals method is
broken.o1
- the first object to compareo2
- the second object to comparepublic static <T> boolean isEqual(T[] array1, T[] array2)
T
- the component type of the arraysarray1
- the first array to comparearray2
- the second array to compare