@Test void testEquals() { Assertions.assertTrue(StringUtils.equals("1", "1")); Assertions.assertFalse(StringUtils.equals("1", "2")); Assertions.assertFalse(StringUtils.equals(null, "1")); Assertions.assertFalse(StringUtils.equals("1", null)); Assertions.assertFalse(StringUtils.equals("", null)); Assertions.assertFalse(StringUtils.equals(null, "")); }
public static boolean equals(String a, String b) { if (a == null) { return b == null; } return a.equals(b); }
StringUtils { public static boolean equals(String a, String b) { if (a == null) { return b == null; } return a.equals(b); } }
StringUtils { public static boolean equals(String a, String b) { if (a == null) { return b == null; } return a.equals(b); } private  StringUtils(); }
StringUtils { public static boolean equals(String a, String b) { if (a == null) { return b == null; } return a.equals(b); } private  StringUtils(); static boolean isNullOrEmpty(String str); static boolean isBlank(String str); static boolean isNotBlank(String str); static boolean equals(String a, String b); static boolean equalsIgnoreCase(String a, String b); static String inputStream2String(InputStream is); static byte[] inputStream2Bytes(InputStream is); static String toString(Object obj); }
StringUtils { public static boolean equals(String a, String b) { if (a == null) { return b == null; } return a.equals(b); } private  StringUtils(); static boolean isNullOrEmpty(String str); static boolean isBlank(String str); static boolean isNotBlank(String str); static boolean equals(String a, String b); static boolean equalsIgnoreCase(String a, String b); static String inputStream2String(InputStream is); static byte[] inputStream2Bytes(InputStream is); static String toString(Object obj); static final String EMPTY; }