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 isIgnoredApp(String packageName) {
    if (packageName.equalsIgnoreCase("com.android.vending"))
        return true;
    return false;
}

From source file:Main.java

public static String getMaximumExp(String jobExperienceTo) {
    return jobExperienceTo.equalsIgnoreCase("1") ? jobExperienceTo + " Year" : jobExperienceTo + " Years";
}

From source file:Main.java

public static boolean getCheckBoxTypeOpposite(String type) {

    if (type.equalsIgnoreCase("Y")) {
        return false;
    } else if (type.equalsIgnoreCase("N")) {
        return true;
    } else {//from w w  w  . j a v a2 s  . c  o  m
        return false;
    }
}

From source file:Main.java

public static boolean isPalindrome(String stringToTest) {
    String workingCopy = removeJunk(stringToTest);
    String reversedCopy = reverse(workingCopy);

    return reversedCopy.equalsIgnoreCase(workingCopy);
}

From source file:Main.java

public static boolean isVideoAllowRead(String suffix) {
    String[] suffixs = { ".avi", ".mp4", ".mov", ".wmv", ".rm", ".rmvb", ".3gp", ".mkv", ".flv" };
    for (String s : suffixs) {
        if (s.equalsIgnoreCase(suffix)) {
            return true;
        }/*  w  ww. jav  a 2  s.c om*/
    }
    return false;
}

From source file:Main.java

/**
 * Checks if is empty.//from  w w w.java2s .  co m
 *
 * @param str the str
 * @return true, if is empty
 */
public static boolean isEmpty(String str) {
    return str == null || str.equalsIgnoreCase("null") || str.trim().length() == 0;
}

From source file:Main.java

/**
 * does the tag equal the given name ignoring case
 * @param tag//from   www . j  a  v a  2s .  c om
 * @param name
 * @return
 */
public static boolean isTag(String tag, String name) {
    if (tag.equalsIgnoreCase(name))
        return true;
    return false;
}

From source file:Main.java

public static boolean getCheckBoxType(String type) {

    if (type.equalsIgnoreCase("Y")) {
        return true;
    } else if (type.equalsIgnoreCase("N")) {
        return false;
    } else {/*w w  w .  j a v  a2  s  .  c  o  m*/
        return false;
    }
}

From source file:Main.java

public static boolean isStartHotWord(List<String> strings) {
    for (String s : strings) {
        if (s.equalsIgnoreCase(HOTWORD_START)) {
            return true;
        }//from w  w  w .j ava2 s .  com
    }
    return false;
}

From source file:Main.java

public static boolean isImageAllowRead(String suffix) {

    String[] suffixs = { ".png", ".jpg", ".gif", ".bmp", ".jpeg", };
    for (String s : suffixs) {
        if (s.equalsIgnoreCase(suffix)) {
            return true;
        }/*w  w  w  . j a v  a 2 s.c o  m*/
    }
    return false;
}