Tell if two strings are equal, without worry if the first string is null.

@param p String reference, which may be null.
@param t String reference, which may be null.

@return true if strings are equal.
13672
private static final boolean subPartMatch(String p, String t)
    {
        return (p == t) || ((null != p) && (p.equals(t)));
    }
350606
public static <T> void assertNotEquals (@Nullable final T x, @Nullable final T y)
  {
    assertNotEquals ((String) null, x, y);
  }
789325
public static boolean is_tavarga(String str)
    {

        if (str.equals("t") || str.equals("T") || str.equals("d") || str.equals("D") || str.equals("n")) return true;

        return false;
    }
532485
public static boolean areElementsLessThanOrEqual(
        LongTuple t, long value)
    {
        for (int i=0; i<t.getSize(); i++)
        {
            if (t.get(i) > value)
            {
                return false;
            }
        }
        return true;
    }
367043
public static boolean isEqualOrNull( Map s1,
                                         Map s2 ) {
        if ( s1 == null
                && s2 == null ) {
            return true;
        } else if ( s1 != null
                && s2 != null
                && s1.size() == s2.size() ) {
            return true;
        }
        return false;
    }
1328201
protected void validateEqualString(String s1, String s2, String errorKey, String errorMessage) {
		if (s1 == null || s2 == null || (! s1.equals(s2))) {
			addError(errorKey, errorMessage);
		}
	}
643847
public static void validateNotEqual(Object t1, Object t2, String errorMsg) throws ValidateException {
		if (equal(t1, t2)) {
			throw new ValidateException(errorMsg);
		}
	}
1352917
def is_equal(self, string1, string2):
        '''  '''
        return string1.lower().strip() == string2.lower().strip()
811829
public int compare(T o1, T o2) {
	if(o1 == o2)   return 0;
	String str1 = (o1 == null) ? "null" : o1.toString(); 
	String str2 = (o2 == null) ? "null" : o2.toString();
	return str1.compareTo(str2);
    }
565661
private boolean isNamedParam(String arg) {
        return arg.startsWith("--") && (arg.indexOf('=') > 2 && validFirstChar(arg.charAt(2)));
    }
1272454
public boolean isEqualityComparable(Type s, Type t, Warner warn) {
        if (t.isNumeric() && s.isNumeric())
            return true;

        boolean tPrimitive = t.isPrimitive();
        boolean sPrimitive = s.isPrimitive();
        if (!tPrimitive && !sPrimitive) {
            return isCastable(s, t, warn) || isCastable(t, s, warn);
        } else {
            return false;
        }
    }
781389
private static boolean isEqualOrNull(String left, String right) {
        return (left != null && left.equals(right)) || (left == null && right == null);
    }
627773
public static boolean equalEncodings(String str1, String str2)
    {
        final int len1 = str1.length();
        final int len2 = str2.length();

        // Need to loop completely over both Strings
        for (int i1 = 0, i2 = 0; i1 < len1 || i2 < len2; ) {
            int c1 = (i1 >= len1) ?  EOS : str1.charAt(i1++);
            int c2 = (i2 >= len2) ?  EOS : str2.charAt(i2++);

            // Can first do a quick comparison (usually they are equal)
            if (c1 == c2) {
                continue;
            }

            // if not equal, maybe there are WS/hyphen/underscores to skip
            while (c1 <= INT_SPACE || c1 == '_' || c1 == '-') {
                c1 = (i1 >= len1) ?  EOS : str1.charAt(i1++);
            }
            while (c2 <= INT_SPACE || c2 == '_' || c2 == '-') {
                c2 = (i2 >= len2) ?  EOS : str2.charAt(i2++);
            }
            // Ok, how about case differences, then?
            if (c1 != c2) {
                // If one is EOF, can't match (one is substring of the other)
                if (c1 == EOS || c2 == EOS) {
                    return false;
                }
                if (c1 < 127) { // ascii is easy...
                    if (c1 <= 'Z' && c1 >= 'A') {
                        c1 = c1 + ('a' - 'A');
                    }
                } else {
                    c1 = Character.toLowerCase((char)c1);
                }
                if (c2 < 127) { // ascii is easy...
                    if (c2 <= 'Z' && c2 >= 'A') {
                        c2 = c2 + ('a' - 'A');
                    }
                } else {
                    c2 = Character.toLowerCase((char)c2);
                }
                if (c1 != c2) {
                    return false;
                }
            }
        }

        // If we got this far, we are ok as long as we got through it all
        return true; 
    }
297145
private static boolean isEqual(Method m, Method a) {
        if (m.getName().equals(a.getName()) && m.getParameterTypes().length == a.getParameterTypes().length && m.getReturnType().isAssignableFrom(a.getReturnType())) {
            for (int i = 0; i < m.getParameterTypes().length; i++) {
                if (!(m.getParameterTypes()[i].isAssignableFrom(a.getParameterTypes()[i]))) {
                    return false;
                }
            }
            return true;
        }
        return false;
    }
1065297
public void toEqual(T other) {
		if (this.value == null && other == null) {
			return;
		}
		expectNotNull(this.value, "Expected null to be equal '%s'", other);
		expectNotNull(other, "Expected '%s' to be equal null", this.value);
		expectTrue(this.value.equals(other), "Expected '%s' to be equal '%s'", this.value, other);
	}
1051227
private boolean checkStringToBeParsed(final String pStringToBeParsed) {

    // Check for nullness
    if (pStringToBeParsed == null) {
      if (mDebugging) {
        out.println(DebugUtil.getPrefixDebugMessage(this) + "string to be parsed is null - rejection!");
      }
      return false;
    }

    // Check if valid character (element in alphabet)
    for (int i = 0; i < pStringToBeParsed.length(); i++) {
      if (!isInAlphabet(pStringToBeParsed.charAt(i))) {
        if (mDebugging) {
          out.println(DebugUtil.getPrefixDebugMessage(this)
                      + "one or more characters in string to be parsed are not legal characters - rejection!");
        }
        return false;
      }
    }
    return true;
  }
462432
private boolean parametersAreEqual(MimeType other) {
        if (this.parameters.size() != other.parameters.size()) {
            return false;
        }

        for (String key : this.parameters.keySet()) {
            if (!other.parameters.containsKey(key)) {
                return false;
            }

            if (PARAM_CHARSET.equals(key)) {
                if (!ObjectUtils.nullSafeEquals(getCharset(), other.getCharset())) {
                    return false;
                }
            } else if (!ObjectUtils.nullSafeEquals(this.parameters.get(key), other.parameters.get(key))) {
                return false;
            }
        }

        return true;
    }