Example usage for java.lang String equalsIgnoreCase

List of usage examples for java.lang String equalsIgnoreCase

Introduction

In this page you can find the example usage for java.lang String equalsIgnoreCase.

Prototype

public boolean equalsIgnoreCase(String anotherString) 

Source Link

Document

Compares this String to another String , ignoring case considerations.

Usage

From source file:Main.java

public static boolean checkNULL(String url) {
    return TextUtils.isEmpty(url) || url.equalsIgnoreCase("null");
}

From source file:Main.java

public static boolean equalsIgnoreCase(String str1, String str2) {
    return str1 != null ? str1.equalsIgnoreCase(str2) : str2 == null;
}

From source file:Main.java

private static boolean isEmpty(String s) {
    return (s == null || s.equals("") || s.equalsIgnoreCase(UNKNOWN));
}

From source file:Main.java

public static boolean containsFilePath(ArrayList<String> filePaths, String filePath) {
    for (String onePath : filePaths) {
        if (onePath.equalsIgnoreCase(filePath)) {
            return true;
        }/*from w  ww  . j a va 2s  . co m*/
    }
    return false;
}

From source file:Main.java

public static boolean isPasswordCorrect(String password, String againPasswrod) {
    if (password.equalsIgnoreCase(againPasswrod))
        return true;
    return false;

}

From source file:Main.java

public static String getStateAcronym(String state) {
    if (state.equalsIgnoreCase("New South Wales"))
        return "NSW";
    if (state.equalsIgnoreCase("Queensland"))
        return "QLD";
    if (state.equalsIgnoreCase("Australian Capital Territory"))
        return "ACT";
    if (state.equalsIgnoreCase("Victoria"))
        return "VIC";
    if (state.equalsIgnoreCase("Northern Territory"))
        return "NT";
    if (state.equalsIgnoreCase("Western Australia"))
        return "WA";
    if (state.equalsIgnoreCase("South Australia"))
        return "SA";
    if (state.equalsIgnoreCase("Tasmania"))
        return "TAS";
    return state;
}

From source file:Main.java

private static boolean isLib(String ext) {
    for (String s : LIBRARY_EXTENSIONS) {
        if (s.equalsIgnoreCase(ext))
            return true;
    }//from   w w  w  . j  ava 2  s  . co m
    return false;
}

From source file:Main.java

private static String fromOdm2XformDataType(String dataType) {
    if (dataType.equalsIgnoreCase("integer"))
        return "xsd:int";
    else if (dataType.equalsIgnoreCase("float"))
        return "xsd:decimal";
    else if (dataType.equalsIgnoreCase("date"))
        return "xsd:date";
    else if (dataType.equalsIgnoreCase("time"))
        return "xsd:time";
    else if (dataType.equalsIgnoreCase("datetime"))
        return "xsd:dateTime";
    else if (dataType.equalsIgnoreCase("boolean"))
        return "xsd:boolean";
    else if (dataType.equalsIgnoreCase("double"))
        return "xsd:decimal";
    else if (dataType.equalsIgnoreCase("base64Binary"))
        return "xsd:base64Binary";

    return "xsd:string"; //text,string, etc
}

From source file:Main.java

private static boolean isDoc(String ext) {
    for (String s : DOCUMENT_EXTENSIONS) {
        if (s.equalsIgnoreCase(ext))
            return true;
    }/*  w  w  w.  j ava2 s  .c om*/
    return false;
}

From source file:Main.java

/**
 * /*from w  w w.java  2s  .c o m*/
 * @param checkNull
 * @return empty string if the value is null
 */
public static String checkForNull(String checkNull) {
    if (checkNull != null && !checkNull.equalsIgnoreCase("null"))
        return checkNull;
    else
        return "";
}