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 isMagicBoxDevice() {
    String manufacturer = Build.MANUFACTURER;
    String productName = Build.PRODUCT;
    return manufacturer.equalsIgnoreCase("MagicBox") && productName.equalsIgnoreCase("MagicBox");
}

From source file:Main.java

public static boolean supportABI(String requestAbi) {
    String abi = get_CPU_ABI();
    if (!TextUtils.isEmpty(abi) && abi.equalsIgnoreCase(requestAbi))
        return true;

    String abi2 = get_CPU_ABI2();
    if (!TextUtils.isEmpty(abi2) && abi.equalsIgnoreCase(requestAbi))
        return true;

    return false;
}

From source file:no.met.jtimeseries.chart.RendererFactory.java

public static XYItemRenderer createRenderer(String splineStyle) {
    // render the line with spline
    if (splineStyle.equalsIgnoreCase(SplineStyle.STANDARD)) {
        return new XYSplineRenderer();
    } else if (splineStyle.equalsIgnoreCase(SplineStyle.CARDINAL)) {
        return new XYCardinalSplineRenderer();
    } else {/*from ww  w  . ja v a  2  s .  co  m*/
        // render the line without spline
        StandardXYItemRenderer render = new StandardXYItemRenderer();
        render.setDrawSeriesLineAsPath(true);
        return render;
    }
}

From source file:com.twitter.hbc.core.HttpConstants.java

public static boolean checkHttpMethod(String httpMethod) {
    if (httpMethod.equalsIgnoreCase(HttpGet.METHOD_NAME)) {
        return true;
    } else if (httpMethod.equalsIgnoreCase(HttpPost.METHOD_NAME)) {
        return true;
    }/* w  w w  . ja  v a  2  s . c o  m*/
    return false;
}

From source file:org.commonjava.maven.galley.transport.htcli.model.LocationTrustType.java

public static LocationTrustType getType(String named) {
    for (LocationTrustType type : values()) {
        if (type.name().equalsIgnoreCase(named)) {
            return type;
        }/*from  w ww . j  av  a 2s. co m*/

        for (String alias : type.aliases) {
            if (alias.equalsIgnoreCase(named)) {
                return type;
            }
        }
    }

    return DEFAULT;
}

From source file:org.commonjava.util.jhttpc.model.SiteTrustType.java

public static SiteTrustType getType(String named) {
    for (SiteTrustType type : values()) {
        if (type.name().equalsIgnoreCase(named)) {
            return type;
        }//w  w w.  j a  v  a2  s  .c om

        for (String alias : type.aliases) {
            if (alias.equalsIgnoreCase(named)) {
                return type;
            }
        }
    }

    return DEFAULT;
}

From source file:javacommon.excel.ExcelConstants.java

/**
 * ?Excel//  w w w. j  a v a2s .  c om
 *
 * @param filename
 * @return Excel  0 : 1997Excel(?xls);1 : 2007Excel(?xlsx)
 */
public static int getExcelType(String filename) {
    String extension = FilenameUtils.getExtension(filename);
    if (extension.equalsIgnoreCase("xls")) {
        return EXCEL_XLS_VERSION;
    } else if (extension.equalsIgnoreCase("xlsx")) {
        return EXCEL_XLSX_VERSION;
    }
    return EXCEL_XLS_VERSION;
}

From source file:com.inkubator.securitycore.util.UserInfoUtil.java

public static Boolean hasRole(String roleName) {
    Boolean isHasRole = Boolean.FALSE;
    for (String role : getRoles()) {
        if (role.equalsIgnoreCase(roleName)) {
            isHasRole = Boolean.TRUE;
            break;
        }/*from w  w w .ja  va  2s . c  o m*/
    }
    return isHasRole;
}

From source file:Main.java

public static synchronized boolean isEqualStrings(String firstString, String secondString) {

    return isAllNull(firstString, secondString) && firstString.equalsIgnoreCase(secondString);
}

From source file:Main.java

/**
 * judge whether is a pdf file.// w w w .  j a va  2s .co  m
 * 
 * @param path the file path
 * @return true if it is a image file, otherwise false
 */
public static boolean isPdfFile(String path) {

    String extention = path.substring(path.lastIndexOf(".", path.length()) + 1, path.length());
    if (extention.equalsIgnoreCase("pdf")) {
        return true;
    }
    return false;
}