test_class.file: api/src/test/java/edu/wpi/first/shuffleboard/api/util/EqualityUtilsTest.java
test_class.identifier: EqualityUtilsTest
test_class.superclass: extends UtilityClassTest<EqualityUtils>
test_case.body: @Test
    public void isEqualInvalidPrimativeTest() {
      assertThrows(UnsupportedOperationException.class, () -> EqualityUtils.isEqual(new long[0], new long[0]));
    }
test_case.class_method_signature: EqualityUtilsTest.isEqualInvalidPrimativeTest()
test_case.full_signature: @Test public void isEqualInvalidPrimativeTest()
test_case.identifier: isEqualInvalidPrimativeTest
test_case.invocations: assertThrows isEqual
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void isEqualInvalidPrimativeTest()
focal_class.file: api/src/main/java/edu/wpi/first/shuffleboard/api/util/EqualityUtils.java
focal_class.identifier: EqualityUtils
focal_class.class_method_signature: EqualityUtils.EqualityUtils()
focal_class.full_signature: private  EqualityUtils()
focal_class.identifier: EqualityUtils
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.signature:  EqualityUtils()
focal_class.class_method_signature: EqualityUtils.isDifferent(Object o1, Object o2)
focal_class.full_signature: public static boolean isDifferent(Object o1, Object o2)
focal_class.identifier: isDifferent
focal_class.modifiers: public static
focal_class.parameters: (Object o1, Object o2)
focal_class.return: boolean
focal_class.signature: boolean isDifferent(Object o1, Object o2)
focal_class.class_method_signature: EqualityUtils.isDifferent(T[] array1, T[] array2)
focal_class.full_signature: public static boolean isDifferent(T[] array1, T[] array2)
focal_class.identifier: isDifferent
focal_class.modifiers: public static
focal_class.parameters: (T[] array1, T[] array2)
focal_class.return: boolean
focal_class.signature: boolean isDifferent(T[] array1, T[] array2)
focal_class.class_method_signature: EqualityUtils.isEqual(Object o1, Object o2)
focal_class.full_signature: public static boolean isEqual(Object o1, Object o2)
focal_class.identifier: isEqual
focal_class.modifiers: public static
focal_class.parameters: (Object o1, Object o2)
focal_class.return: boolean
focal_class.signature: boolean isEqual(Object o1, Object o2)
focal_class.class_method_signature: EqualityUtils.isEqual(T[] array1, T[] array2)
focal_class.full_signature: public static boolean isEqual(T[] array1, T[] array2)
focal_class.identifier: isEqual
focal_class.modifiers: public static
focal_class.parameters: (T[] array1, T[] array2)
focal_class.return: boolean
focal_class.signature: boolean isEqual(T[] array1, T[] array2)
focal_method.body: public static boolean isEqual(Object o1, Object o2) {
      if (o1 == null || o2 == null) {
        return o1 == o2; //NOPMD comparing objects using ==; one of these is null so PMD is being dumb
      }
      final Class<?> classA = o1.getClass();
      final Class<?> classB = o2.getClass();
  
      // check arrays
      if (classA.isArray() && classB.isArray()) {
        final Class<?> typeA = classA.getComponentType();
        final Class<?> typeB = classB.getComponentType();
        if (typeA.equals(typeB)) {
          final Class<?> arrayType = typeA;
          if (arrayType.isPrimitive()) {
            // Primitive arrays
            if (arrayType == int.class) {
              return Arrays.equals((int[]) o1, (int[]) o2);
            } else if (arrayType == double.class) {
              return Arrays.equals((double[]) o1, (double[]) o2);
            } else if (arrayType == byte.class) {
              return Arrays.equals((byte[]) o1, (byte[]) o2);
            } else if (arrayType == short.class) {
              return Arrays.equals((short[]) o1, (short[]) o2);
            } else if (arrayType == char.class) {
              return Arrays.equals((char[]) o1, (char[]) o2);
            } else if (arrayType == boolean.class) {
              return Arrays.equals((boolean[]) o1, (boolean[]) o2);
            } else if (arrayType == float.class) {
              return Arrays.equals((float[]) o1, (float[]) o2);
            }
            throw new UnsupportedOperationException(
                "Cannot compare primitive arrays of type " + arrayType.getSimpleName());
          } else {
            // Object or multi-dimensional arrays
            return isEqual((Object[]) o1, (Object[]) o2);
          }
        } else {
          // Different component types eg int[] and String[]
          return false;
        }
      }
  
      return Objects.equals(o1, o2);
    }
focal_method.class_method_signature: EqualityUtils.isEqual(Object o1, Object o2)
focal_method.full_signature: public static boolean isEqual(Object o1, Object o2)
focal_method.identifier: isEqual
focal_method.invocations: getClass getClass isArray isArray getComponentType getComponentType equals isPrimitive equals equals equals equals equals equals equals getSimpleName isEqual equals
focal_method.modifiers: public static
focal_method.parameters: (Object o1, Object o2)
focal_method.return: boolean
focal_method.signature: boolean isEqual(Object o1, Object o2)