Example usage for java.lang String equals

List of usage examples for java.lang String equals

Introduction

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

Prototype

public boolean equals(Object anObject) 

Source Link

Document

Compares this string to the specified object.

Usage

From source file:Main.java

public static boolean isThisPackage(String packageName) {
    return packageName.equals("com.device.security.analytics.androidsecurityanalyticspro")
            || packageName.equals("com.device.security.analytics.androidsecurityanalytics");
}

From source file:Main.java

public static boolean isTime(String sTime) {
    if (sTime.equals("None")) {
        return false;
    }//from   w w  w .  j  a v a 2  s .com
    // 9 am
    String time[] = sTime.split(" ");
    return (time.length == 2);
}

From source file:Main.java

public static boolean noString(String v) {
    return v == null || v.equals("");
}

From source file:Main.java

private static boolean isUnaryOperator(String operator) {
    if (operator.equals("EXISTS") || operator.equals("NOTEXISTS")) {
        return true;
    } else {/*from   w w  w. jav a 2s .  com*/
        return false;
    }
}

From source file:Main.java

public static boolean vaildateAttributeName(String attributeName) {
    if (attributeName.equals(""))
        return false;
    return true;/*from  ww  w.  ja va 2 s.c  o m*/
}

From source file:Main.java

public static boolean getBooleanForRestrictedOperator(String value, String result, String operator) {
    if (operator.equals("=")) {
        return value.equals(result);
    } else if (operator.equals("!=")) {
        return !value.equals(result);
    }/*www.  ja v  a2  s .c o  m*/
    return false;
}

From source file:Main.java

public static String fillNullNumberString(String s) {
    return (s == null || s.equals("")) ? "0.00" : s;
}

From source file:Main.java

public static AbstractColorChooserPanel findPanel(JColorChooser chooser, String name) {
    AbstractColorChooserPanel[] panels = chooser.getChooserPanels();
    for (int i = 0; i < panels.length; i++) {
        String clsName = panels[i].getClass().getName();
        if (clsName.equals(name)) {
            return panels[i];
        }//from  www . j a  v a 2s.c om
    }
    return null;
}

From source file:Main.java

/**
 * Checks if the String representation of a Function
 * is of type SUM/*ww  w.  j  a  va  2  s . co  m*/
 * @param in Func as String
 * @return true or false
 */
public static boolean isUDFSUMorSUM(String in) {
    return in.equals(UDF_AGR_FUNC_PAILLIER) || in.equals(UDF_AGR_FUNC_ELGAMAL)
            || in.toUpperCase().equals(SUPPORTED_FUNCS[0]);
}