@Test public void testObjectEquals() { Integer a = null; Integer b = new Integer(5); assertFalse(Utils.objectEquals(a, b)); assertTrue(Utils.objectEquals(a, null)); a = new Integer(6); assertFalse(Utils.objectEquals(a, b)); a = new Integer(b.intValue()); assertTrue(Utils.objectEquals(a, b)); }
public static boolean objectEquals(Object a, Object b) { if (a == null && b != null) { return false; } else if (a != null && b == null) { return false; } else if (a != null && b != null) { return a.equals(b); } return true; }
Utils { public static boolean objectEquals(Object a, Object b) { if (a == null && b != null) { return false; } else if (a != null && b == null) { return false; } else if (a != null && b != null) { return a.equals(b); } return true; } }
Utils { public static boolean objectEquals(Object a, Object b) { if (a == null && b != null) { return false; } else if (a != null && b == null) { return false; } else if (a != null && b != null) { return a.equals(b); } return true; }  }
Utils { public static boolean objectEquals(Object a, Object b) { if (a == null && b != null) { return false; } else if (a != null && b == null) { return false; } else if (a != null && b != null) { return a.equals(b); } return true; }  static String tokenToAuthString(String token); static void showToast(Context context, String errorMessage); static SharedPreferences.Editor getSharedPrefEditor(Context context); static SharedPreferences getSharedPref(Context context); static void logout(Context context); static Uri getNewImageUri(Context context); static boolean isLocalUrl(String url); static boolean isClose(double a, double b); static boolean objectEquals(Object a, Object b); static double roundToDecimals(double num, int precision); static boolean isValidYear(String s); static String yearString(int year); }
Utils { public static boolean objectEquals(Object a, Object b) { if (a == null && b != null) { return false; } else if (a != null && b == null) { return false; } else if (a != null && b != null) { return a.equals(b); } return true; }  static String tokenToAuthString(String token); static void showToast(Context context, String errorMessage); static SharedPreferences.Editor getSharedPrefEditor(Context context); static SharedPreferences getSharedPref(Context context); static void logout(Context context); static Uri getNewImageUri(Context context); static boolean isLocalUrl(String url); static boolean isClose(double a, double b); static boolean objectEquals(Object a, Object b); static double roundToDecimals(double num, int precision); static boolean isValidYear(String s); static String yearString(int year);  }