@Test public void testEquals() throws Exception { String a = "aaa"; String b = "bbb"; String c = new String(a); String n = null; assertFalse(ObjectsCompat.equals(a, b)); assertFalse(ObjectsCompat.equals(a, n)); assertFalse(ObjectsCompat.equals(n, a)); assertTrue(ObjectsCompat.equals(n, n)); assertTrue(ObjectsCompat.equals(a, a)); assertTrue(ObjectsCompat.equals(a, c)); }
public static boolean equals(@Nullable Object a, @Nullable Object b) { if (Build.VERSION.SDK_INT >= 19) { return Objects.equals(a, b); } else { return (a == b) || (a != null && a.equals(b)); } }
ObjectsCompat { public static boolean equals(@Nullable Object a, @Nullable Object b) { if (Build.VERSION.SDK_INT >= 19) { return Objects.equals(a, b); } else { return (a == b) || (a != null && a.equals(b)); } } }
ObjectsCompat { public static boolean equals(@Nullable Object a, @Nullable Object b) { if (Build.VERSION.SDK_INT >= 19) { return Objects.equals(a, b); } else { return (a == b) || (a != null && a.equals(b)); } } private  ObjectsCompat(); }
ObjectsCompat { public static boolean equals(@Nullable Object a, @Nullable Object b) { if (Build.VERSION.SDK_INT >= 19) { return Objects.equals(a, b); } else { return (a == b) || (a != null && a.equals(b)); } } private  ObjectsCompat(); static boolean equals(@Nullable Object a, @Nullable Object b); static int hashCode(@Nullable Object o); static int hash(@Nullable Object... values); }
ObjectsCompat { public static boolean equals(@Nullable Object a, @Nullable Object b) { if (Build.VERSION.SDK_INT >= 19) { return Objects.equals(a, b); } else { return (a == b) || (a != null && a.equals(b)); } } private  ObjectsCompat(); static boolean equals(@Nullable Object a, @Nullable Object b); static int hashCode(@Nullable Object o); static int hash(@Nullable Object... values);  }