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

private static boolean isWeb(String ext) {
    for (String s : WEB_EXTENSIONS) {
        if (s.equalsIgnoreCase(ext))
            return true;
    }//  w  w  w .j  a v a 2s  . c  o m
    return false;
}

From source file:Main.java

public static boolean isEqualsVersion(String localVersionTagName, String serverVersionTagName) {
    return (localVersionTagName.equalsIgnoreCase(serverVersionTagName));
}

From source file:Main.java

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

From source file:Main.java

public static boolean listContainsIgnoreCase(ArrayList<String> list, String str) {
    for (Iterator<String> iterator = list.iterator(); iterator.hasNext();) {
        String string = (String) iterator.next();

        if (string.equalsIgnoreCase(str))
            return true;
    }//from w ww .  j  a  va 2  s.  c o  m
    return false;
}

From source file:Main.java

private static boolean isDb(String ext) {
    for (String s : DATABASE_EXTENSIONS) {
        if (s.equalsIgnoreCase(ext))
            return true;
    }//from w  w  w.  ja  v a2s  .c om
    return false;
}

From source file:Main.java

public static int level(String levelString) {
    if (levelString.equalsIgnoreCase("verbose")) {
        return 1;
    }/*from   ww  w  .  j a  va 2 s  .  co m*/
    if (levelString.equalsIgnoreCase("debug")) {
        return 2;
    }
    if (levelString.equalsIgnoreCase("info")) {
        return 3;
    }
    if (levelString.equalsIgnoreCase("warn")) {
        return 4;
    }
    if (levelString.equalsIgnoreCase("error")) {
        return 5;
    }
    if (levelString.equalsIgnoreCase("exception")) {
        return 6;
    }
    if (levelString.equalsIgnoreCase("fatal")) {
        return 7;
    }
    return 1;
}

From source file:Main.java

public static boolean isNetworkTypeSupported(String networkType) {
    for (String networkItem : mSupportedNetworkTypes) {
        if (networkItem.equalsIgnoreCase(networkType)) {
            return true;
        }// www . j  av  a  2  s.c  o m
    }

    return false;
}

From source file:Main.java

public static boolean isEmpty(String str) {
    if (str == null || str.length() == 0 || str.equalsIgnoreCase("null") || str.isEmpty() || str.equals("")) {
        return true;
    } else {/*  w  w w .  j a v  a 2s.co m*/
        return false;
    }
}

From source file:Main.java

private static boolean isText(String ext) {
    for (String s : TEXT_EXTENSIONS) {
        if (s.equalsIgnoreCase(ext))
            return true;
    }//from ww  w.  ja  v a 2  s  . co m
    return false;
}

From source file:Main.java

private static boolean isArchive(String ext) {
    for (String s : ARCHIVE_EXTENSIONS) {
        if (s.equalsIgnoreCase(ext))
            return true;
    }/*from  w w  w .j a  v  a  2 s  .com*/
    return false;
}