Java Assert assertSameClazz(Object object, Object defaults)

Here you can find the source of assertSameClazz(Object object, Object defaults)

Description

assert Same Clazz

License

Open Source License

Declaration

private static void assertSameClazz(Object object, Object defaults) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

public class Main {
    private static void assertSameClazz(Object object, Object defaults) {
        if (!object.getClass().equals(defaults.getClass())) {
            throw new RuntimeException("Objects must have the same class: " + object.getClass().getName() + " != "
                    + defaults.getClass().getName());
        }// ww w .ja  v a2s .co  m
    }
}

Related

  1. assertQualifiedString(String str, String argName)
  2. assertRange(String label, double value, double min, double max)
  3. assertRequiredArgs(Object[] methodArgs, int requiredArgs, String methodName)
  4. assertSame(Object expected, Object actual)
  5. assertSame(Object targetObject0, Object targetObject1)
  6. assertSameObject(Object obj1, Object obj2)
  7. assertSameSize(double[][] newLogPhi, double[][] logPhi)
  8. assertSorted(final int[] values)
  9. assertSplit(final String text, final int length)