/** * Compares 2 strings. If one of the strings is <code>null</code>, <code>false</code> is returned. if * both string are <code>null</code>, <code>true</code> is returned. * * @param s1 first string to compare * @param s2 second string * * @return <code>true</code> if strings are equal, otherwise <code>false</code> */ public static boolean equals(String s1, String s2) { return Util.equals(s1, s2); }
/** * Compares 2 strings. If one of the strings is <code>null</code>, <code>false</code> is returned. if * both string are <code>null</code>, <code>true</code> is returned. * * @param s1 first string to compare * @param s2 second string * * @return <code>true</code> if strings are equal, otherwise <code>false</code> */ public static boolean equals(final String s1, final String s2) { return Util.equals(s1, s2); }
while (iter.hasNext()) { Object o = iter.next(); if (equals(o, element)) { return true; while (enumeration.hasMoreElements()) { Object o = enumeration.nextElement(); if (equals(o, element)) { return true; for (int i = 0; i < len; i++) { Object o = Array.get(obj, i); if (equals(o, element)) { return true;
while (iter.hasNext()) { Object o = iter.next(); if (equals(o, element)) { return true; while (enumeration.hasMoreElements()) { Object o = enumeration.nextElement(); if (equals(o, element)) { return true; for (int i = 0; i < len; i++) { Object o = Array.get(obj, i); if (equals(o, element)) { return true;
@Test void testEquals() { Object a = new Integer(173); Object b = new Integer(1); Object c = new Integer(173); assertTrue(Util.equals(a, a)); assertTrue(Util.equals(a, c)); assertTrue(Util.equals(c, a)); assertFalse(Util.equals(a, b)); assertFalse(Util.equals(b, a)); assertFalse(Util.equals(a, null)); assertFalse(Util.equals(null, a)); assertTrue(Util.equals(null, null)); }
/** * Compares 2 strings. If one of the strings is <code>null</code>, <code>false</code> is returned. if * both string are <code>null</code>, <code>true</code> is returned. * * @param s1 first string to compare * @param s2 second string * * @return <code>true</code> if strings are equal, otherwise <code>false</code> */ public static boolean equals(final String s1, final String s2) { return Util.equals(s1, s2); }
/** * Compares 2 strings. If one of the strings is <code>null</code>, <code>false</code> is returned. if * both string are <code>null</code>, <code>true</code> is returned. * * @param s1 first string to compare * @param s2 second string * @return <code>true</code> if strings are equal, otherwise <code>false</code> */ public static boolean equals(String s1, String s2) { return Util.equals(s1, s2); }
while (iter.hasNext()) { Object o = iter.next(); if (equals(o, element)) { return true; while (enumeration.hasMoreElements()) { Object o = enumeration.nextElement(); if (equals(o, element)) { return true; for (int i = 0; i < len; i++) { Object o = Array.get(obj, i); if (equals(o, element)) { return true;
while (iter.hasNext()) { Object o = iter.next(); if (equals(o, element)) { return true; while (enumeration.hasMoreElements()) { Object o = enumeration.nextElement(); if (equals(o, element)) { return true; for (int i = 0; i < len; i++) { Object o = Array.get(obj, i); if (equals(o, element)) { return true;